コード例 #1
0
 /**
  *
  * @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);
 }
コード例 #2
0
ファイル: Sequence.php プロジェクト: GemsTracker/MUtil
 /**
  * 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;
 }