protected function getCurrentPackageStates()
    {
        $savePackageStates = false;
        $loadedPackageStates = $this->loadPackageStates();
        if (
            empty($loadedPackageStates)
            || !isset($loadedPackageStates['version'])
            || $loadedPackageStates['version'] < self::PACKAGESTATE_FORMAT_VERSION
        ) {
            $loadedPackageStates = $this->scanAvailablePackages();
            $savePackageStates = true;
        }

        if ($savePackageStates) {
            $loadedPackageStates = $this->sortAndSavePackageStates($loadedPackageStates);
        }

        return $loadedPackageStates;
    }
protected function getCurrentPackageStates()
    {
        $savePackageStates = false;
        $loadedPackageStates = $this->loadPackageStates();
        if (
            empty($loadedPackageStates)
            || !isset($loadedPackageStates['version'])
            || $loadedPackageStates['version'] < self::PACKAGESTATE_FORMAT_VERSION
        ) {
            $loadedPackageStates = $this->scanAvailablePackages();
            $savePackageStates = true;
        }

        if ($savePackageStates) {
            $loadedPackageStates = $this->sortAndSavePackageStates($loadedPackageStates);
        }

        return $loadedPackageStates;
    }
protected function getCurrentPackageStates ( ) { $ savePackageStates = false ; $ loadedPackageStates = $ this -> loadPackageStates ( ) ; if ( empty ( $ loadedPackageStates ) || ! isset ( $ loadedPackageStates [ 'version' ] ) || $ loadedPackageStates [ 'version' ] < self :: PACKAGESTATE_FORMAT_VERSION ) { $ loadedPackageStates = $ this -> scanAvailablePackages ( ) ; $ savePackageStates = true ; } if ( $ savePackageStates ) { $ loadedPackageStates = $ this -> sortAndSavePackageStates ( $ loadedPackageStates ) ; } return $ loadedPackageStates ; }
Loads the states of available packages from the PackageStates.php file and
initialises a package scan if the file was not found or the configuration format
was not current.

@return array
Loads the states of available packages from the PackageStates . php file and initialises a package scan if the file was not found or the configuration format was not current .