Exemple #1
0
 /**
  * Add a value to the set as a reference, respects 'strict' option
  * 
  * @param mixed $value The value to add to the set.
  * 
  * @return int The new count of the array
  * 
  */
 public function addReference(&$value)
 {
     if ($this->conf->unique) {
         $this->checkUniqueValues(array_merge($this->data, array($value)));
     }
     $identity = $this->getNewIdentity();
     $this->data[$identity] =& $value;
     $this->data = StandardResource\ArrayUtilities::returnUniqueByReference($this->data);
     return $identity;
 }
Exemple #2
0
 /**
  * Get A Range Of Index References
  * 
  * This gets an array of objects that have priorities between ranges
  * 
  * NOTE: The utility function must be used because of incompatibility
  *       of array_unique algorithm
  * 
  * @param Falcraft\Data\Types\Range $r The range to include
  * 
  * @return array The appropriate array
  * 
  */
 public function indexRangeReference(Types\Range $r)
 {
     return StandardResource\ArrayUtilities::returnUniqueByReference(array_merge($this->indexReference($r->getMinimum(), self::HIGHER), $this->indexReference($r->getMaximum(), self::LOWER)));
 }