instance example

private $state = 1;
    public $smarty_token_names = array (        // Text for parser error messages                    );

    private $smarty;

    private $mbstring_overload;

    function __construct($data$smarty)
    {
        // set instance object         self::instance($this);
        $this->data = $data . "\n"; //now all lines are \n-terminated         $this->counter = 0;
        $this->line = 1;
        $this->smarty = $smarty;
        $this->mbstring_overload = ini_get('mbstring.func_overload') & 2;
    }
    public static function Dinstance($new_instance = null)
    {
        static $instance = null;
        if (isset($new_instance) && is_object($new_instance))
            $instance = $new_instance;
        

    public function trigger_config_file_error($args = null)
    {
        $this->lex = Smarty_Internal_Configfilelexer::instance();
        $this->parser = Smarty_Internal_Configfileparser::instance();
        // get template source line which has error         $line = $this->lex->line;
        if (isset($args)) {
            // $line--;         }
        $match = preg_split("/\n/", $this->lex->data);
        $error_text = "Syntax error in config file '{$this->config->source->filepath}' on line {$line} '{$match[$line-1]}' ";
        if (isset($args)) {
            // individual error message             $error_text .= $args;
        }
// states whether the parse was successful or not     public $successful = true;
    public $retvalue = 0;
    private $lex;
    private $internalError = false;
    private $smarty;
    private $compiler;
    private $yymajor;

    function __construct($lex$compiler) {
        // set instance object         self::instance($this);
        $this->lex = $lex;
        $this->smarty = $compiler->smarty;
        $this->compiler = $compiler;
    }
    public static function Dinstance($new_instance = null)
    {
        static $instance = null;
        if (isset($new_instance) && is_object($new_instance))
            $instance = $new_instance;
        return $instance;
    }

    
Home | Imprint | This part of the site doesn't use cookies.