Horde_Icalendar::getAttributeDefault PHP Метод

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

Returns the value of an attribute, or a specified default value if the attribute does not exist.
public getAttributeDefault ( string $name, mixed $default = '' ) : mixed
$name string The name of the attribute.
$default mixed What to return if the attribute specified by $name does not exist.
Результат mixed (mixed) The value of $name. (mixed) $default if $name does not exist.
    public function getAttributeDefault($name, $default = '')
    {
        try {
            return $this->getAttribute($name);
        } catch (Horde_Icalendar_Exception $e) {
            return $default;
        }
    }