public function getDependsInfo()
    {
        $dependsInfo = $this->getCachedValue('dependsInfo');
        if ($dependsInfo === false) {

            $data = $this->dataProvider->getData();

            $dependsInfo = array();

            foreach ($this->getPackageSortOrder() as $packageId => $order) {
                if (!isset($data[$packageId])) {
                    continue;
                }

                $provides = $this->getProvidesForPackage($packageId);
                foreach ($provides as $file => $fileInfo) {
                    if (!isset($dependsInfo[$file])) {
                        $dependsInfo[$file] = array();
                    }
                    if (isset($fileInfo['Depends'])) {
                        $dependsInfo[$file] = array_merge(
                            $dependsInfo[$file],
                            $fileInfo['Depends']
                        );
                    }
                    // TODO: some day we could treat optional-depends
                    // differently
                    if (isset($fileInfo['OptionalDepends'])) {
                        $dependsInfo[$file] = array_merge(
                            $dependsInfo[$file],
                            $fileInfo['OptionalDepends']
                        );
                    }
                }
            }

            $this->setCachedValue('dependsInfo', $dependsInfo);
        }

        return $dependsInfo;
    }
public function getDependsInfo()
    {
        $dependsInfo = $this->getCachedValue('dependsInfo');
        if ($dependsInfo === false) {

            $data = $this->dataProvider->getData();

            $dependsInfo = array();

            foreach ($this->getPackageSortOrder() as $packageId => $order) {
                if (!isset($data[$packageId])) {
                    continue;
                }

                $provides = $this->getProvidesForPackage($packageId);
                foreach ($provides as $file => $fileInfo) {
                    if (!isset($dependsInfo[$file])) {
                        $dependsInfo[$file] = array();
                    }
                    if (isset($fileInfo['Depends'])) {
                        $dependsInfo[$file] = array_merge(
                            $dependsInfo[$file],
                            $fileInfo['Depends']
                        );
                    }
                    // TODO: some day we could treat optional-depends
                    // differently
                    if (isset($fileInfo['OptionalDepends'])) {
                        $dependsInfo[$file] = array_merge(
                            $dependsInfo[$file],
                            $fileInfo['OptionalDepends']
                        );
                    }
                }
            }

            $this->setCachedValue('dependsInfo', $dependsInfo);
        }

        return $dependsInfo;
    }
public function getDependsInfo ( ) { $ dependsInfo = $ this -> getCachedValue ( 'dependsInfo' ) ; if ( $ dependsInfo === false ) { $ data = $ this -> dataProvider -> getData ( ) ; $ dependsInfo = array ( ) ; foreach ( $ this -> getPackageSortOrder ( ) as $ packageId => $ order ) { if ( ! isset ( $ data [ $ packageId ] ) ) { continue ; } $ provides = $ this -> getProvidesForPackage ( $ packageId ) ; foreach ( $ provides as $ file => $ fileInfo ) { if ( ! isset ( $ dependsInfo [ $ file ] ) ) { $ dependsInfo [ $ file ] = array ( ) ; } if ( isset ( $ fileInfo [ 'Depends' ] ) ) { $ dependsInfo [ $ file ] = array_merge ( $ dependsInfo [ $ file ] , $ fileInfo [ 'Depends' ] ) ; } // TODO: some day we could treat optional-depends // differently if ( isset ( $ fileInfo [ 'OptionalDepends' ] ) ) { $ dependsInfo [ $ file ] = array_merge ( $ dependsInfo [ $ file ] , $ fileInfo [ 'OptionalDepends' ] ) ; } } } $ this -> setCachedValue ( 'dependsInfo' , $ dependsInfo ) ; } return $ dependsInfo ; }
Gets a flat list of file dependencies for each file

@return array
Gets a flat list of file dependencies for each file