private function _addManifests( array $deps, array $stack=array( ) )
	{
		foreach ( $deps as $extName => $name )
		{
			if ( in_array( $extName, $this->_extensionsDone ) ) {
				continue;
			}

			if ( in_array( $extName, $stack ) ) {
				$msg = sprintf( 'Circular dependency for "%1$s" detected', $extName );
				throw new Exception( $msg );
			}

			$stack[] = $extName;

			/** @todo test for expression object or array when implementing version checks */
			if ( isset( $this->_dependencies[$extName] ) ) {
				$this->_addManifests( (array) $this->_dependencies[$extName], $stack );
			}

			if ( isset( $this->_extensions[$extName] ) ) {
				$this->_manifests[$this->_extensions[$extName]['location']] = $this->_extensions[$extName];
			}

			$this->_extensionsDone[] = $extName;
		}
	}
private function _addManifests( array $deps, array $stack=array( ) )
	{
		foreach ( $deps as $extName => $name )
		{
			if ( in_array( $extName, $this->_extensionsDone ) ) {
				continue;
			}

			if ( in_array( $extName, $stack ) ) {
				$msg = sprintf( 'Circular dependency for "%1$s" detected', $extName );
				throw new Exception( $msg );
			}

			$stack[] = $extName;

			/** @todo test for expression object or array when implementing version checks */
			if ( isset( $this->_dependencies[$extName] ) ) {
				$this->_addManifests( (array) $this->_dependencies[$extName], $stack );
			}

			if ( isset( $this->_extensions[$extName] ) ) {
				$this->_manifests[$this->_extensions[$extName]['location']] = $this->_extensions[$extName];
			}

			$this->_extensionsDone[] = $extName;
		}
	}
private function _addManifests ( array $ deps , array $ stack = array ( ) ) { foreach ( $ deps as $ extName => $ name ) { if ( in_array ( $ extName , $ this -> _extensionsDone ) ) { continue ; } if ( in_array ( $ extName , $ stack ) ) { $ msg = sprintf ( 'Circular dependency for "%1$s" detected' , $ extName ) ; throw new Exception ( $ msg ) ; } $ stack [ ] = $ extName ; /** @todo test for expression object or array when implementing version checks */ if ( isset ( $ this -> _dependencies [ $ extName ] ) ) { $ this -> _addManifests ( ( array ) $ this -> _dependencies [ $ extName ] , $ stack ) ; } if ( isset ( $ this -> _extensions [ $ extName ] ) ) { $ this -> _manifests [ $ this -> _extensions [ $ extName ] [ 'location' ] ] = $ this -> _extensions [ $ extName ] ; } $ this -> _extensionsDone [ ] = $ extName ; } }
Re-order the given dependencies of each manifest configuration.

@param array $deps List of dependencies
@param array $stack List of task names that are scheduled after this task
@todo version checks
Re - order the given dependencies of each manifest configuration .