dwest / mason Goto Github PK
View Code? Open in Web Editor NEWNo Fuss PHP Templates
No Fuss PHP Templates
Sometimes you want to append or prepend something to the parent's content instead of replacing it outright. This is not currently possible with append/prepend because they work only in the parent template. To that end we should add before and after functions that work outside of the normal blocks and are only concatenated after the block is full processed.
For example:
===File A===
===File B===
<?php $after('content')?>
<div>After</div>
<?php $end('content')?>
===File C===
<?php $before('content')?>
<div>Before</div>
<?php $end('content")?>
<?php $block('content')?>
<div>Override</div>
<?php $end('content')?>
Would produce:
When mason cannot find a requested template file it throws an exception. Unfortunately if this happens inside a __toString method this causes a fatal error which cannot be caught and provides little information as to why the application died.
Possible solutions:
Need to be able to dynamically add methods.
See: https://docs.djangoproject.com/en/dev/howto/custom-template-tags/
Mason should use set_error_handler to return a list of errors from render instead of rendering them into the source of the page.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.