Horde_Kolab_Format_Xml_Type_Base::loadMissing PHP Method

loadMissing() protected method

Load a default value for a node.
protected loadMissing ( string $name, array $params ) : mixed
$name string The attribute name.
$params array The parameters for the current operation.
return mixed The default value.
    protected function loadMissing($name, $params)
    {
        if ($this->value == Horde_Kolab_Format_Xml::VALUE_NOT_EMPTY && !$this->isRelaxed($params)) {
            throw new Horde_Kolab_Format_Exception_MissingValue($name);
        }
        if ($this->value == Horde_Kolab_Format_Xml::VALUE_DEFAULT) {
            return $this->default;
        }
    }