Class yii\twig\ViewRendererStaticClassProxy

Inheritanceyii\twig\ViewRendererStaticClassProxy
Source Code https://github.com/yiisoft/yii2-twig/blob/master/ViewRendererStaticClassProxy.php

Class-proxy for static classes Needed because you can't pass static class to Twig other way

Method Details

Hide inherited methods

__call() public method

public mixed __call ( $method, $arguments )
$method string
$arguments array

                public function __call($method, $arguments)
{
    return call_user_func_array([$this->_staticClassName, $method], $arguments);
}

            
__construct() public method

public void __construct ( $staticClassName )
$staticClassName string

                public function __construct($staticClassName)
{
    $this->_staticClassName = $staticClassName;
}

            
__get() public method

public mixed __get ( $property )
$property string

                public function __get($property)
{
    $class = new \ReflectionClass($this->_staticClassName);
    return $class->getStaticPropertyValue($property);
}

            
__set() public method

public mixed __set ( $property, $value )
$property string
$value mixed

                public function __set($property, $value)
{
    $class = new \ReflectionClass($this->_staticClassName);
    $class->setStaticPropertyValue($property, $value);
    return $value;
}