/** * Clear property * * @param string $name property name * * @return AeNode_Nested self */ public function clear($name) { $name = (string) $name; if ($this->propertyExists($name, 'set')) { return parent::clear($name); } return $this->_clearByKey($name, $this->_properties); }
public function set($name, $value) { $name = (string) $name; if ($this->propertyExists($name, 'set')) { // *** This may be one of the table fields if ($this->_recordModel->hasField($name)) { $this->_updateField($name, $value); } } return parent::set($name, $value); }
/** * Get node with bound state * * Return an instance of a node with all the properties passed in * <var>$array</var> associative array assigned to it: * * <code> $node = AeNode::__set_state(array( * 'foo' => 'hello', * 'bar' => 'world' * )); * * echo $node->get('foo') . ' ' . $node->get('bar'); // prints "hello world"</code> * * @param array $array an associative array of properties * * @return object|AeNode a resulting node or custom object */ public static function __set_state($array) { if (count($array) > 0) { $node = new AeNode(); $node->bind($array); } return $node; }