/**
  * Checks if this object is identical to the given DependencyList
  * instance.
  *
  * Two DependencyList instances are considered identical if their
  * dependency list keys (the instance IDs) matches according to
  * the PHP == array operator specification. Please note that this
  * method does not check if the two instance are really the same
  * instance. It also doesn't check the instantiated dependencies
  * on the two objects. As long as the instance IDs on the list is
  * the same, the two object is considered identical.
  *
  * @return bool TRUE if considered identical, FALSE otherwise
  *
  */
 public function isIdentical(DependencyList $dependencyList)
 {
     $listA = array_keys($dependencyList->getList());
     $listB = array_keys($this->list);
     return $listA == $listB;
 }
Example #2
0
 /**
  * Add dependencies from the DependencyList instance given to the
  * stack.
  *
  * @see get()
  * @see addToStack()
  * @param DependencyList $dependencyList The dependency list to
  *        be added to the stack.
  * @param index $dependencyOf The index of the stack item that owns
  *        the given dependency list.
  *
  */
 protected function addDependenciesToStack(DependencyList $dependencyList, $dependencyOf)
 {
     foreach ($dependencyList->getList() as $reference) {
         $this->addToStack($reference, $dependencyOf);
     }
 }