/** * * @param \Gems_Menu $menu * @param string $glue Optional, text to put between link items */ public function __construct(\Gems_Menu $menu, $glue = ' ') { $this->menu = $menu; parent::__construct(); $this->setGlue($glue); }
/** * Set the item in the sequence, unless a set{Index} function * exists or the new value is an instance of a special type. * * @param mixed $index scalar * @param mixed $newval * @return void */ public function offsetSet($index, $newval) { if ($index && !is_numeric($index)) { if (method_exists($this, $fname = 'set' . $index)) { $this->{$fname}($newval); return; } } /* if (! $this->_specialTypes) { \MUtil_Echo::backtrace(); } // */ foreach ($this->_specialTypes as $class => $method) { if ($newval instanceof $class) { $this->{$method}($newval, $index); return; } } parent::offsetSet($index, $newval); return; }