Copyright 2011-2016 Horde LLC (http://www.horde.org/) See the enclosed file COPYING for license information (LGPL). If you did not receive this file, see http://www.horde.org/licenses/lgpl21.
Автор: Gunnar Wrobel (wrobel@pardus.de)
Пример #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;
 }
Пример #2
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 !== false) {
         return $result;
     } else {
         $attributes[$name] = new DateTime();
     }
 }
Пример #3
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 !== false) {
         return $result;
     } else {
         if ($this->value != Horde_Kolab_Format_Xml::VALUE_MAYBE_MISSING) {
             $attributes[$name] = $this->loadMissing($name, $params);
         }
         return false;
     }
 }
Пример #4
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 === false) {
         $result = parent::load('categories', $attributes, $parent_node, $helper, $params);
     }
     if ($result !== false && ($value = $this->loadNodeValue($result, $helper, $params)) !== null) {
         $attributes[$name] = $value;
         return $result;
     } else {
         if (!$this->isRelaxed($params)) {
             throw new Horde_Kolab_Format_Exception_MissingValue('Preferences XML object is missing an application setting.');
         } else {
             return false;
         }
     }
 }