src/Store/Document.php
public function autoVar($default = null)
    {
        $backtrace = debug_backtrace();
        $name = '';
        if (isset($backtrace[1]['class'])) {
            $name = $backtrace[1]['class'] . '::';
        }
        $name .= $backtrace[1]['function'];
        $name .= '(' . $backtrace[1]['line'] . ')';
        $var = new DocumentVar($this, $name);
        if (isset($default)) {
            $var->setDefault($default);
        }
        return $var;
    }
public function autoVar($default = null)
    {
        $backtrace = debug_backtrace();
        $name = '';
        if (isset($backtrace[1]['class'])) {
            $name = $backtrace[1]['class'] . '::';
        }
        $name .= $backtrace[1]['function'];
        $name .= '(' . $backtrace[1]['line'] . ')';
        $var = new DocumentVar($this, $name);
        if (isset($default)) {
            $var->setDefault($default);
        }
        return $var;
    }
public function autoVar ( $ default = null ) { $ backtrace = debug_backtrace ( ) ; $ name = '' ; if ( isset ( $ backtrace [ 1 ] [ 'class' ] ) ) { $ name = $ backtrace [ 1 ] [ 'class' ] . '::' ; } $ name .= $ backtrace [ 1 ] [ 'function' ] ; $ name .= '(' . $ backtrace [ 1 ] [ 'line' ] . ')' ; $ var = new DocumentVar ( $ this , $ name ) ; if ( isset ( $ default ) ) { $ var -> setDefault ( $ default ) ; } return $ var ; }
Create a persistent variable using this document.

@param mixed $default
Default value.
@return Statevar State variable.
Create a persistent variable using this document .