public function getFilteredPackages($packageState = 'available', $packagePath = null, $packageType = null)
    {
        switch (strtolower($packageState)) {
            case 'available':
                $packages = $this->getAvailablePackages();
                break;
            case 'frozen':
                $packages = $this->getFrozenPackages();
                break;
            default:
                throw new Exception\InvalidPackageStateException('The package state "' . $packageState . '" is invalid', 1372458274);
        }

        if ($packagePath !== null) {
            $packages = $this->filterPackagesByPath($packages, $packagePath);
        }
        if ($packageType !== null) {
            $packages = $this->filterPackagesByType($packages, $packageType);
        }

        return $packages;
    }
public function getFilteredPackages($packageState = 'available', $packagePath = null, $packageType = null)
    {
        switch (strtolower($packageState)) {
            case 'available':
                $packages = $this->getAvailablePackages();
                break;
            case 'frozen':
                $packages = $this->getFrozenPackages();
                break;
            default:
                throw new Exception\InvalidPackageStateException('The package state "' . $packageState . '" is invalid', 1372458274);
        }

        if ($packagePath !== null) {
            $packages = $this->filterPackagesByPath($packages, $packagePath);
        }
        if ($packageType !== null) {
            $packages = $this->filterPackagesByType($packages, $packageType);
        }

        return $packages;
    }
public function getFilteredPackages ( $ packageState = 'available' , $ packagePath = null , $ packageType = null ) { switch ( strtolower ( $ packageState ) ) { case 'available' : $ packages = $ this -> getAvailablePackages ( ) ; break ; case 'frozen' : $ packages = $ this -> getFrozenPackages ( ) ; break ; default : throw new Exception \ InvalidPackageStateException ( 'The package state "' . $ packageState . '" is invalid' , 1372458274 ) ; } if ( $ packagePath !== null ) { $ packages = $ this -> filterPackagesByPath ( $ packages , $ packagePath ) ; } if ( $ packageType !== null ) { $ packages = $ this -> filterPackagesByType ( $ packages , $ packageType ) ; } return $ packages ; }
Returns an array of PackageInterface objects of all packages that match
the given package state, path, and type filters. All three filters must match, if given.

@param string $packageState defaults to available
@param string $packagePath DEPRECATED since Flow 5.0
@param string $packageType

@return array<PackageInterface>
@throws Exception\InvalidPackageStateException
@api
Returns an array of PackageInterface objects of all packages that match the given package state path and type filters . All three filters must match if given .