Model::_get_static_property PHP Method

_get_static_property() protected static method

Retrieve the value of a static property on a class. If the class or the property does not exist, returns the default value supplied as the third argument (which defaults to null).
protected static _get_static_property ( string $class_name, string $property, null | string $default = null ) : string
$class_name string
$property string
$default null | string
return string
    protected static function _get_static_property($class_name, $property, $default = null)
    {
        if (!class_exists($class_name) || !property_exists($class_name, $property)) {
            return $default;
        }
        $properties = get_class_vars($class_name);
        return $properties[$property];
    }