public function getLayout(& $content)
    {
        //$res = preg_match("/\<\!-- php__layout\((.+)\) --\>/", $str, $match);
        $res = preg_match("/\{layout\s+(.+)\}/", $content, $match);
        if ($res) {
            return str_replace(array('"', '\'', '.html'), '', $match[1]);
        }
        return null;
    }
public function getLayout(& $content)
    {
        //$res = preg_match("/\<\!-- php__layout\((.+)\) --\>/", $str, $match);
        $res = preg_match("/\{layout\s+(.+)\}/", $content, $match);
        if ($res) {
            return str_replace(array('"', '\'', '.html'), '', $match[1]);
        }
        return null;
    }
public function getLayout ( & $ content ) { //$res = preg_match("/\<\!-- php__layout\((.+)\) --\>/", $str, $match); $ res = preg_match ( "/\{layout\s+(.+)\}/" , $ content , $ match ) ; if ( $ res ) { return str_replace ( array ( '"' , '\'' , '.html' ) , '' , $ match [ 1 ] ) ; } return null ; }
get layout from template content, if not set return null.
@param  string $content
@return string|NULL
get layout from template content if not set return null .