SimplePie_IRI::__get() public WP 1.0
Overload __get() to provide access via properties
{} Это метод класса: SimplePie_IRI{}
Хуков нет.
Возвращает
Разное
. Null. Ничего.
Использование
$SimplePie_IRI = new SimplePie_IRI(); $SimplePie_IRI->__get( $name );
- $name(строка) (обязательный)
- Property name
Код SimplePie_IRI::__get() SimplePie IRI:: get WP 5.7
public function __get($name)
{
// isset() returns false for null, we don't want to do that
// Also why we use array_key_exists below instead of isset()
$props = get_object_vars($this);
if (
$name === 'iri' ||
$name === 'uri' ||
$name === 'iauthority' ||
$name === 'authority'
)
{
$return = $this->{"get_$name"}();
}
elseif (array_key_exists($name, $props))
{
$return = $this->$name;
}
// host -> ihost
elseif (($prop = 'i' . $name) && array_key_exists($prop, $props))
{
$name = $prop;
$return = $this->$prop;
}
// ischeme -> scheme
elseif (($prop = substr($name, 1)) && array_key_exists($prop, $props))
{
$name = $prop;
$return = $this->$prop;
}
else
{
trigger_error('Undefined property: ' . get_class($this) . '::' . $name, E_USER_NOTICE);
$return = null;
}
if ($return === null && isset($this->normalization[$this->scheme][$name]))
{
return $this->normalization[$this->scheme][$name];
}
return $return;
}