Wire::__get PHP Метод

__get() публичный Метод

If not overridden, this is primarily used as a shortcut for the fuel() method. Descending classes may have their own __get() but must pass control to this one when they can't find something.
public __get ( string $name ) : mixed | null
$name string
Результат mixed | null
    public function __get($name)
    {
        if ($name == 'wire' || $name == 'fuel') {
            return self::$fuel;
        }
        if ($name == 'className') {
            return $this->className();
        }
        if ($this->useFuel()) {
            if (!is_null(self::$fuel) && !is_null(self::$fuel->{$name})) {
                return self::$fuel->{$name};
            }
        }
        if (self::isHooked($name)) {
            // potential property hook
            $result = $this->runHooks($name, array(), 'property');
            return $result['return'];
        }
        return null;
    }

Usage Example

Пример #1
0
 public function __get($key)
 {
     if ($key == 'delimiter') {
         return $this->delimeter;
     }
     // @todo learn how to spell
     return parent::__get($key);
 }
All Usage Examples Of Wire::__get