PageRenderTime 25ms CodeModel.GetById 23ms app.highlight 1ms RepoModel.GetById 1ms app.codeStats 0ms

/lib/Haanga/Extension/Filter/Cut.php

http://github.com/crodas/Haanga
PHP | 23 lines | 8 code | 2 blank | 13 comment | 0 complexity | f153d7028713e7a0eabd0ce3d6acf196 MD5 | raw file
 1<?php
 2
 3Class Haanga_Extension_Filter_Cut
 4{
 5
 6    /**
 7     *  We implement "cut" filter at compilation time, to 
 8     *  avoid senseless includes for simple things.
 9     *
10     *  We can also define an "php_alias" that will simple
11     *  call this function (therefore it must exists at
12     *  rendering time).
13     *
14     *  Also a Main() static method could be declared, this will
15     *  included at runtime  or copied as a function if the CLI is used (more
16     *  or less django style).
17     *  
18     */
19    static function generator($compiler, $args)
20    {
21        return hexec('str_replace', $args[1], "", $args[0]);
22    }
23}