_function = $function; } public function addParameter($value) { $proc = new ProcessorObject($this->_function); $proc->_setParameters($this->_params); $proc->_addParameter($value); return new AndObject($proc); } private function _addParameter($value) { $this->_params[] = $value; } private function _setParameters($params) { $this->_params = $params; } public function process($value=null) { if($value !== null) return $this->addParameter($value)->process(); $result = call_user_func_array($this->_function, $this->_params); return new IntermediateObject($result); } public function to($name) { VarStore::set($name, $this); return $this; } public function __get($name) { if($name == 'result') return $this->process(); } }