HamlPHP::getCompiler PHP Method

getCompiler() public method

Returns a compiler object.
public getCompiler ( ) : Compiler
return Compiler
    public function getCompiler()
    {
        if ($this->_compiler === null) {
            $this->_compiler = new Compiler($this);
        }
        return $this->_compiler;
    }

Usage Example

Example #1
0
 public function __construct()
 {
     $this->evaluator = new ContentEvaluator();
     $hamlPHP = new HamlPHP(new FileStorage(dirname(__FILE__) . '/tmp/'));
     $hamlPHP->disableCache();
     $this->compiler = $hamlPHP->getCompiler();
 }