_run(); } /** * Call the function with parameters * @param array $params Can contain it() to reference to the original value before the function call * @return AndObject Contains an IntermediateObject pointing to the function again */ public function with(Array $params) { return $this->_run($params); } public function __get($name) { if($name == 'and') { return $this->_run()->and; } } private function _run($args=null) { $result = null; if($args !== null) { if(is_array($args)) { foreach($args as $k => $v) { if($v instanceof ItObject) $args[$k] = self::_previousInStack(); } } if(!$this->_dummy) $result = call_user_func_array($this->_value, $args); } else if(!$this->_dummy) $result = call_user_func($this->_value); CallObject::getInstance()->setResult($result); $fnc = (is_array($this->_value)) ? $this->_value[0] : $this->_value; $int = new IntermediateObject($fnc); $int->setDummy($this->_dummy); return new AndObject($int); } }