Skip to main content

Code

call, code

{{ code some_php_scripts(); }}

Run writed PHP scripts, like eval method.

{{ call '/controller/method/params' }}

Call another Controller methods.

Example

code

Template
{{ code phpinfo(); }}
// Run phpinfo();
Template
{{ code $array = array('foo', 'bar'); var_dump( array_reverse($array) ); }}
// Run $array = array('foo', 'bar'); var_dump( array_reverse($array) );
Output
array(2) { [0]=> string(3) "bar" [1]=> string(3) "foo" }

call

Template
{{ call '/controller/method/params' }}
// Call Controller::method('params');

{{ call '/Person/get/id/1' }}
// Call Person::get('id', '1');