コード例 #1
0
ファイル: Set.php プロジェクト: berlinonline/dat0r
 public function offsetSet($offset, $value)
 {
     foreach ($this->items as $index => $item) {
         if ($item === $value) {
             $offset = $index;
             break;
         }
     }
     parent::offsetSet($offset, $value);
 }
コード例 #2
0
ファイル: TypedArrayList.php プロジェクト: dazarobbo/cola
 public function offsetSet($offset, $value)
 {
     $this->validTypeThrow($value);
     return parent::offsetSet($offset, $value);
 }
コード例 #3
0
ファイル: RouteList.php プロジェクト: riskatlas/micka
 /**
  * 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);
 }
コード例 #4
0
ファイル: collection.php プロジェクト: bahrmichael/eyeos
 /**
  * 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;
 }