public function registerPartial($name, $partial = false)
    {
        $partials = [];
        if (is_array($name)) {
            $partials = $name;
        } elseif (is_object($name)) {
            $partials = get_object_vars($name);
        }

        if (count($partials)) {
            $this->registerPhpArray('partial', $partials);
        } elseif ($partial === false) {
            $this->registerJavascriptObject('partial', $name);
        } else {
            $this->register('partial', $name, $partial);
        }
    }
public function registerPartial($name, $partial = false)
    {
        $partials = [];
        if (is_array($name)) {
            $partials = $name;
        } elseif (is_object($name)) {
            $partials = get_object_vars($name);
        }

        if (count($partials)) {
            $this->registerPhpArray('partial', $partials);
        } elseif ($partial === false) {
            $this->registerJavascriptObject('partial', $name);
        } else {
            $this->register('partial', $name, $partial);
        }
    }
public function registerPartial ( $ name , $ partial = false ) { $ partials = [ ] ; if ( is_array ( $ name ) ) { $ partials = $ name ; } elseif ( is_object ( $ name ) ) { $ partials = get_object_vars ( $ name ) ; } if ( count ( $ partials ) ) { $ this -> registerPhpArray ( 'partial' , $ partials ) ; } elseif ( $ partial === false ) { $ this -> registerJavascriptObject ( 'partial' , $ name ) ; } else { $ this -> register ( 'partial' , $ name , $ partial ) ; } }
Registers partials accessible by any template in the environment
@param string|array|object $name
@param string|bool $partial
Registers partials accessible by any template in the environment