Horde_Kolab_Format_Xml_Type_Base::load PHP Метод

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

Load the node value from the Kolab object.
public load ( string $name, &$attributes, DOMNode $parent_node, Horde_Kolab_Format_Xml_Helper $helper, array $params = [] ) : DOMNode | boolean
$name string The name of the the attribute to be fetched.
$parent_node DOMNode The parent node of the node to be loaded.
$helper Horde_Kolab_Format_Xml_Helper A XML helper instance.
$params array Additiona parameters for this parse operation.
Результат DOMNode | boolean The named DOMNode or false if no node value was found.
    public function load($name, &$attributes, $parent_node, Horde_Kolab_Format_Xml_Helper $helper, $params = array())
    {
        if ($node = $helper->findNodeRelativeTo('./' . $name, $parent_node)) {
            if (($value = $this->loadNodeValue($node, $helper, $params)) !== null) {
                $attributes[$name] = $value;
                return $node;
            }
        }
        return false;
    }

Usage Example

Пример #1
0
 /**
  * Load the node value from the Kolab object.
  *
  * @param string                        $name        The name of the the
  *                                                   attribute to be fetched.
  * @param array                         &$attributes The data array that
  *                                                   holds all attribute
  *                                                   values.
  * @param DOMNode                       $parent_node The parent node of the
  *                                                   node to be loaded.
  * @param Horde_Kolab_Format_Xml_Helper $helper      A XML helper instance.
  * @param array                         $params      Additiona parameters for
  *                                                   this parse operation.
  *
  * @return DOMNode|boolean The named DOMNode or false if no node value was
  *                         found.
  */
 public function load($name, &$attributes, $parent_node, Horde_Kolab_Format_Xml_Helper $helper, $params = array())
 {
     $result = parent::load($name, $attributes, $parent_node, $helper, $params);
     if (!$result && !$this->isRelaxed($params)) {
         throw new Horde_Kolab_Format_Exception_MissingUid();
     }
     return $result;
 }
All Usage Examples Of Horde_Kolab_Format_Xml_Type_Base::load