コード例 #1
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;
 }