lib/ParserGenerator/PHP/ParserGenerator/Data.php
private function tplt_open()
    {
        $templatename = $this->parser_template ? $this->parser_template : dirname(dirname(__FILE__)) . DIRECTORY_SEPARATOR . "Lempar.php";

        $buf = $this->filenosuffix . '.lt';
        if (file_exists($buf) && is_readable($buf)) {
            $tpltname = $buf;
        } elseif (file_exists($templatename) && is_readable($templatename)) {
            $tpltname = $templatename;
        } elseif ($fp = @fopen($templatename, 'rb', true)) {
            return $fp;
        }
        if (!isset($tpltname)) {
            echo "Can't find the parser driver template file \"%s\".\n",
                $templatename;
            $this->errorcnt++;
            return 0;
        }
        $in = @fopen($tpltname,"rb");
        if (!$in) {
            printf("Can't open the template file \"%s\".\n", $tpltname);
            $this->errorcnt++;
            return 0;
        }
        return $in;
    }
private function tplt_open()
    {
        $templatename = $this->parser_template ? $this->parser_template : dirname(dirname(__FILE__)) . DIRECTORY_SEPARATOR . "Lempar.php";

        $buf = $this->filenosuffix . '.lt';
        if (file_exists($buf) && is_readable($buf)) {
            $tpltname = $buf;
        } elseif (file_exists($templatename) && is_readable($templatename)) {
            $tpltname = $templatename;
        } elseif ($fp = @fopen($templatename, 'rb', true)) {
            return $fp;
        }
        if (!isset($tpltname)) {
            echo "Can't find the parser driver template file \"%s\".\n",
                $templatename;
            $this->errorcnt++;
            return 0;
        }
        $in = @fopen($tpltname,"rb");
        if (!$in) {
            printf("Can't open the template file \"%s\".\n", $tpltname);
            $this->errorcnt++;
            return 0;
        }
        return $in;
    }
private function tplt_open ( ) { $ templatename = $ this -> parser_template ? $ this -> parser_template : dirname ( dirname ( __FILE__ ) ) . DIRECTORY_SEPARATOR . "Lempar.php" ; $ buf = $ this -> filenosuffix . '.lt' ; if ( file_exists ( $ buf ) && is_readable ( $ buf ) ) { $ tpltname = $ buf ; } elseif ( file_exists ( $ templatename ) && is_readable ( $ templatename ) ) { $ tpltname = $ templatename ; } elseif ( $ fp = @ fopen ( $ templatename , 'rb' , true ) ) { return $ fp ; } if ( ! isset ( $ tpltname ) ) { echo "Can't find the parser driver template file \"%s\".\n" , $ templatename ; $ this -> errorcnt ++ ; return 0 ; } $ in = @ fopen ( $ tpltname , "rb" ) ; if ( ! $ in ) { printf ( "Can't open the template file \"%s\".\n" , $ tpltname ) ; $ this -> errorcnt ++ ; return 0 ; } return $ in ; }
The next function finds the template file and opens it, returning
a pointer to the opened file.
@return resource
The next function finds the template file and opens it returning a pointer to the opened file .