public static function assignStaticProperty($class, $property, $value)
    {
        $refl = new \ReflectionClass($class);
        $prop = $refl->getProperty($property);
        $prop->setAccessible(true);
        $prop->setValue($value);

        return $value;
    }
public static function assignStaticProperty($class, $property, $value)
    {
        $refl = new \ReflectionClass($class);
        $prop = $refl->getProperty($property);
        $prop->setAccessible(true);
        $prop->setValue($value);

        return $value;
    }
public static function assignStaticProperty ( $ class , $ property , $ value ) { $ refl = new \ ReflectionClass ( $ class ) ; $ prop = $ refl -> getProperty ( $ property ) ; $ prop -> setAccessible ( true ) ; $ prop -> setValue ( $ value ) ; return $ value ; }
Assign the value of a static property of a class, bypassing visibility restrictions.

@param string|object $class    class name or instance
@param string        $property property name
@param mixed         $value

@return mixed Value of $class::$property
Assign the value of a static property of a class bypassing visibility restrictions .