_argumentsByName = array(); foreach ($data->arguments as $argument) { $argument = new Zend_Service_RememberTheMilk_Argument($argument); $this->_argumentsByName[$argument->getName()] = $argument; } } /** * Implementation of IteratorAggregate::getIterator() * * @return ArrayIterator */ public function getIterator() { return new ArrayIterator($this->_argumentsByName); } /** * Implementation of IteratorAggregate::getLength() * * @return int */ public function getLength() { return count($this->_argumentsByName); } /** * Returns the argument instance with the specified name. * * @param string $name Name of the method * @return Zend_Service_RememberTheMilk_Argument */ public function getMethodByName($name) { return $this->_argumentsByName[$name]; } }