/** * set value * * @param mixed $_value */ public function setValue($_value) { parent::setValue($_value); $this->_isResolved = FALSE; }
/** * set value * * NOTE: incoming ids will be rewritten to their corresponding paths * NOTE: incoming *Node operators will be rewritten to their corresponding pathes * * @param mixed $_value */ public function setValue($_value) { // transform *Node operators if (strpos($this->getOperator(), 'Node') !== FALSE) { $_value = $this->_node2path($this->getOperator(), $_value); $this->setOperator('equals'); } $this->_flatten($_value); $value = array(); foreach ((array) $_value as $v) { $this->_flatten($v); // transform id to path if (strpos($v, '/') === FALSE) { try { $v = Tinebase_Container::getInstance()->getContainerById($v, TRUE)->getPath(); } catch (Tinebase_Exception_InvalidArgument $teia) { if (Tinebase_Core::isLogLevel(Zend_Log::WARN)) { Tinebase_Core::getLogger()->warn(__METHOD__ . '::' . __LINE__ . ' ' . $teia->getMessage()); } if (Tinebase_Core::isLogLevel(Zend_Log::DEBUG)) { Tinebase_Core::getLogger()->debug(__METHOD__ . '::' . __LINE__ . ' ' . $teia->getTraceAsString()); } $v = '/'; } } $value[] = $v; } parent::setValue(is_array($_value) ? $value : $value[0]); $this->_isResolved = FALSE; }