예제 #1
0
 /**
  * Push a reference on to the list (fifo, lifo, etc)
  * 
  * remember that AbstractRestrictedList is the parent object and holds
  * the filtering logic.
  * 
  * @return int|null Count of new list, Null if restrictions are not met
  * 
  * @throws Exception\InvalidArgumentException if strict is enabled and
  *         value is not in restrictions
  */
 public function pushReference(&$a)
 {
     $args = func_get_args();
     if (parent::pushReference($a)) {
         return array_push($this->list, $a);
     }
     return null;
 }
예제 #2
0
 /**
  * Push a reference on to the list (fifo, lifo, etc)
  * 
  * This automatically sorts the list after all other requiresments have been met
  * 
  * @return int|null Count of new list, null if restrictions are not met
  * 
  */
 public function pushReference(&$a)
 {
     if (parent::push($a)) {
         array_push($this->list, $a);
         usort($this->list, array($this, 'cmp'));
         return true;
     }
     return null;
 }
예제 #3
0
 /**
  * Push a reference on to the list (fifo, lifo, etc)
  * 
  * @return int|Falcraft\Data\Types\Null Count of new list, Null if
  *              restrictions are not met
  * 
  * @throws \InvalidArgumentException if strict is enabled and value is
  *              not in restrictions
  */
 public function pushReference(&$a)
 {
     if (parent::pushReference($a)) {
         return $this->list->pushReference($a);
     }
     return new Null();
 }