Example #1
0
 public function offsetSet($offset, $value)
 {
     foreach ($this->items as $index => $item) {
         if ($item === $value) {
             $offset = $index;
             break;
         }
     }
     parent::offsetSet($offset, $value);
 }
Example #2
0
 public function offsetSet($offset, $value)
 {
     $this->validTypeThrow($value);
     return parent::offsetSet($offset, $value);
 }
Example #3
0
 /**
  * Adds the router.
  * @param  mixed
  * @param  IRouter
  * @return void
  */
 public function offsetSet($index, $route)
 {
     if (!$route instanceof IRouter) {
         throw new InvalidArgumentException("Argument must be IRouter descendant.");
     }
     parent::offsetSet($index, $route);
 }
Example #4
0
 /**
  * Sets the value at the specified $index to $value.
  * 
  * @param mixed $index
  * @param mixed $value
  * @return bool TRUE if the value has been set successfully
  */
 public function offsetSet($index, $newval)
 {
     if (!$this->contains($newval, $this->strict)) {
         parent::offsetSet($index, $newval);
         return true;
     }
     return false;
 }