Get the includes.

@param array $available

@throws \Tobscure\JsonApi\Exception\InvalidParameterException

@return array
6411
public function getInclude(array $available = [])
    {
        if ($include = $this->getInput('include')) {
            $relationships = explode(',', $include);

            $invalid = array_diff($relationships, $available);

            if (count($invalid)) {
                throw new InvalidParameterException(
                    'Invalid includes ['.implode(',', $invalid).']',
                    1,
                    null,
                    'include'
                );
            }

            return $relationships;
        }

        return [];
    }
136602
public function getAvailableVersions()
    {
        $availableVersions = [];
        foreach ($this->migrations as $migration) {
            $availableVersions[] = $migration->getVersion();
        }

        return $availableVersions;
    }
236132
protected function getInstalledPackages(string $location) : array
    {
        if(isset($this->installedPackages[$location])){
            return $this->installedPackages[$location];
        }

        $installedFile = $location . 'installed.json';
        if(!file_exists($installedFile)){
            return [];
        }

        return $this->installedPackages[$location] = $this->loadJsonFile($installedFile);
    }
292816
public function availableIncludeKeys(): array
    {
        $availableKeys = [];
        if (($transformer = $this->transformer()) !== null && ($transformer instanceof  TransformerInterface)) {
            $availableKeys = $transformer->getAvailableIncludes();
        }

        return $availableKeys;
    }
16781
public function getAll()
    {
        if (!$this->getResource()) {
            return [];
        }
        if ($this->useLocalResource) {
            return $this->localResource;
        }

        // If we're attempting to use a global resource but it doesn't exist, we've got a problem.
        if (!isset($GLOBALS[$this->getResource()])) {
            throw new \Parable\GetSet\Exception(
                "Attempting to use global resource '{$this->getResource()}' but resource not available."
            );
        }

        return $GLOBALS[$this->getResource()];
    }
1102968
private function getAvailableVersions()
    {
        if (!isset($this->availableVersions)) {
            $this->availableVersions = [];
            foreach ($this->getManifest() as $key => $item) {
                if ($missing = array_diff(self::$requiredKeys, array_keys($item))) {
                    throw new \RuntimeException(sprintf(
                        'Manifest item %s missing required key(s): %s',
                        $key,
                        implode(',', $missing)
                    ));
                }
                $this->availableVersions[$item['version']] = $item;
            }
        }

        return $this->availableVersions;
    }
679419
public function getFeaturedStreams($limit = 25, $offset = 0)
    {
        if (!$this->isValidLimit($limit)) {
            throw new InvalidLimitException();
        }

        if (!$this->isValidOffset($offset)) {
            throw new InvalidOffsetException();
        }

        $params = [
            'limit' => intval($limit),
            'offset' => intval($offset),
        ];

        return $this->get('streams/featured', $params);
    }
483620
public function getOutdatedPackages(array $excluded = [])
    {
        // Get all installed and required packages.
        $installed = $this->composer->getInstalledPackages();
        $required = $this->composer->getRequiredPackages();

        $outdated = [];

        // Get the installed version number of the required packages.
        $packages = array_intersect_key($installed, $required);

        foreach ($packages as $package) {
            $name = $package['name'];
            $version = Version::normalize($package['version']);
            $prettyVersion = $required[$name]['version'];
            $devDependency = $package['devDependency'];

            if (in_array($name, $excluded)) {
                continue;
            }

            $package = new Package($name, $version, $prettyVersion, $devDependency);

            if ($package->isOutdated()) {
                $outdated[] = $package;
            }
        }

        return $outdated;
    }
524536
public static function getList(array $options = array())
    {
        $api = new Api\GetService();
        $result = $api->doRequest();
        $paymentMethods = self::reorderOutput($result);

        if (isset($options['country'])) {
            $paymentMethods = self::filterCountry($paymentMethods, $options['country']);
        }

        return $paymentMethods;
    }
1217365
public static function getAvailableProviders()
    {
        $result = array();
        foreach (self::getAllProviders() as $provider) {
            if ($provider->isAvailable()) {
                $result[] = $provider;
            }
        }
        return $result;
    }
882567
public function getAvailable()
    {
        $writers = [];

        foreach ($this->writers as $key => $writer) {
            $writers[$key] = $this->getReadable($writer);
        }

        return $writers;
    }
1243739
static String[] getUsable(final List<String> available, final String[] supported)
    {
        final List<String> filtered = new ArrayList<String>(available.size());
        final List<String> supportedList = Arrays.asList(supported);

        for (final String s : available)
        {
            if (supportedList.contains(s)) filtered.add(s);
        }

        final String[] filteredArray = new String[filtered.size()];
        filtered.toArray(filteredArray);
        return filteredArray;
    }
682286
public function get(array $options)
    {
        $options = $this->options($options);

        $response = $this->client->request('GET', $this->api_host.$this->api_prefix, $options);
        $content = $response->getBody()->getContents();

        $content = $this->repair->repair($content);
        $content = $this->detector->detect($content);

        return $content;
    }
1214191
public function getSort(array $available = [])
    {
        $sort = [];

        if ($input = $this->getInput('sort')) {
            $fields = explode(',', $input);

            foreach ($fields as $field) {
                if (substr($field, 0, 1) === '-') {
                    $field = substr($field, 1);
                    $order = 'desc';
                } else {
                    $order = 'asc';
                }

                $sort[$field] = $order;
            }

            $invalid = array_diff(array_keys($sort), $available);

            if (count($invalid)) {
                throw new InvalidParameterException(
                    'Invalid sort fields ['.implode(',', $invalid).']',
                    3,
                    null,
                    'sort'
                );
            }
        }

        return $sort;
    }
52645
public function getMixableMethods($exclude = array())
    {
        if($this->_column !== 'parameters')
        {
            $exclude = array_merge($exclude, array('getParameters'));
            $methods = parent::getMixableMethods($exclude);

            //Add dynamic methods based on the column name
            $methods['get'.ucfirst($this->_column)] = $this;
            $methods['setProperty'.ucfirst($this->_column)] = $this;
        }
        else $methods = parent::getMixableMethods();

        return $methods;
    }
707763
public function getLists(array $options = array())
    {

        $uri = $this->buildUserResourceUri('lists');
        $response = $this->makeAuthenticatedApiRequest($uri, $options);

        return $response->lists;

    }
877939
public static function get_supported_features(array $configuration = array()) {
        return self::SUPPORTS_DATA_GUARANTEE +
               self::SUPPORTS_NATIVE_TTL +
               self::IS_SEARCHABLE +
               self::SUPPORTS_MULTIPLE_IDENTIFIERS +
               self::DEREFERENCES_OBJECTS;
    }