Returns the list of file contents compactors.

@return CompactorInterface[] The list of compactors.

@throws InvalidArgumentException If a class is not valid.
162426
public function getCompactors()
    {
        $compactors = array();

        if (isset($this->raw->compactors)) {
            foreach ((array) $this->raw->compactors as $class) {
                if (false === class_exists($class)) {
                    throw new InvalidArgumentException(
                        sprintf(
                            'The compactor class "%s" does not exist.',
                            $class
                        )
                    );
                }

                $compactor = new $class();

                if (false === ($compactor instanceof CompactorInterface)) {
                    throw new InvalidArgumentException(
                        sprintf(
                            'The class "%s" is not a compactor class.',
                            $class
                        )
                    );
                }

                if ($compactor instanceof Php) {
                    if (!empty($this->raw->annotations)) {
                        $tokenizer = new Tokenizer();

                        if (isset($this->raw->annotations->ignore)) {
                            $tokenizer->ignore(
                                (array) $this->raw->annotations->ignore
                            );
                        }

                        $compactor->setTokenizer($tokenizer);
                    }
                }

                $compactors[] = $compactor;
            }
        }

        return $compactors;
    }
971257
public function getList()
    {
        $items = array();

        for ($i = 0; $i < $this->zip->numFiles; $i++) {
            $items[] = $this->zip->getNameIndex($i);
        }

        return $items;
    }
726319
public function getAsInteger()
	{
		$permissions	= @fileperms( $this->pathName );
		if( FALSE === $permissions )
			throw new InvalidArgumentException( 'Could not get permissions of file "'.$this->pathName.'"' );
		return octdec( substr( sprintf( '%o', $permissions ), -4 ) );
	}
883080
public function folderContent()
    {
        $result = [];
        $path = $this->ensureUserPath($this->blob->path);

        $list = collect($this->storage->getDriver()->listContents($path))
            ->pluck('path');

        $exclude = (new ThumbService($this->package))->getSizes()->all();
        $isExcluded = function ($path) use ($exclude) {
            $parts = explode('/', Str::normalizePath($path));
            if (count($parts) > 0) {
                return array_key_exists($parts[0], $exclude);
            }

            return false;
        };

        $list->each(function ($glob) use (&$result, $isExcluded) {
            if ($isExcluded($glob)) {
                // skip any thumbs dir and do not show it for users
                return;
            }

            $result[] = (new Blob($this->package))
                ->setPath($glob)
                ->fullDetails();
        });

        return $result;
    }
97289
public function toArray(): array
    {
        $type = $this->getType();

        if (empty($type)) {
            throw new InvalidException('Type has to be set');
        }

        return [$type->getName() => $this->_mapping];
    }
86807
public function getFileList($config)
    {
        if (strpos($config, ',')) {
            return array_filter(explode(',', $config));
        }

        if (!$this->isAbsolutePath($config)) {
            $config = getcwd().'/'.$config;
        }

        if (!file_exists($config)) {
            throw new InvalidArgumentException(sprintf('Configuration file "%s" does not exist.', $config));
        }

        $result = require $config;

        if ($result instanceof Config) {
            return $result->getFilenames();
        }

        if (is_array($result)) {
            return $result;
        }

        throw new InvalidArgumentException('Config must return an array of filenames or a Config object.');
    }
40217
public function getData(string $filePath): array
    {
        if (!is_readable($filePath) || is_dir($filePath)) {
            throw new \InvalidArgumentException('File ' . $filePath . ' is not a readable or not even a file');
        }
        $this->filePath = $filePath;
        $normalizedMetaData = $this->getNormalizedMetaDataFileContent();
        $normalizedMetaData = $this->addPathToData($normalizedMetaData);
        $normalizedMetaData = $this->addFilePathToData($normalizedMetaData);
        $normalizedMetaData = $this->addCheckSumToData($normalizedMetaData);

        return $normalizedMetaData;
    }
630162
public static function getStores()
	{
		// Get a list of types, only including php files
		$glob = glob(__DIR__ . DIRECTORY_SEPARATOR . 'Storage' . DIRECTORY_SEPARATOR . '*.php');

		$names = array();

		if ($glob === false)
		{
			return $names;
		}

		// Loop through the types and find the ones that are available
		foreach ($glob as $handler)
		{
			// Get just the file name
			$name = basename($handler);

			// Derive the class name from the type
			$class = __NAMESPACE__ . '\\Storage\\' . str_ireplace('.php', '', ucfirst(trim($name)));

			// If the class doesn't exist, these are not the droids you're looking for...
			if (!class_exists($class))
			{
				continue;
			}

			// Our class exists, so now we just need to know if it passes it's test method
			if (call_user_func_array(array($class, 'isAvailable'), array()))
			{
				$names[] = str_ireplace('.php', '', $name);
			}
		}

		$names = array_map('strtolower', $names);

		return $names;
	}
145732
public function getFileList()
    {
        $allfiles = [];

        foreach ($this->filesets as $fs) {
            $ds = $fs->getDirectoryScanner($this->project);

            $files = $ds->getIncludedFiles();

            // We need to store these files keyed by the basedir from DirectoryScanner
            // so that we can resolve the fullpath of the file later.
            if (isset($allfiles[$ds->getBasedir()])) {
                $allfiles[$ds->getBasedir()] = array_merge($allfiles[$ds->getBasedir()], $files);
            } else {
                $allfiles[$ds->getBasedir()] = $files;
            }
        }

        $struc = [];

        foreach ($allfiles as $basedir => $files) {
            foreach ($files as $file) {
                // paths are relative to $basedir above
                $path = strtr(dirname($file), DIRECTORY_SEPARATOR, '/');

                if (!$path || $path == '.') {
                    $path = '/'; // for array index
                }

                $parts = explode('.', basename($file));
                $ext = array_pop($parts);
                if (strlen($ext) == strlen($file)) {
                    $ext = '';
                }

                $f = new PhingFile($basedir, $file);

                $struc[$path][] = [
                    'file' => basename($file),
                    'ext' => $ext,
                    'path' => (($path == '/') ? basename($file) : $path . '/' . basename($file)),
                    'fullpath' => $f->getAbsolutePath()
                ];
            }
        }

        uksort($struc, 'strnatcasecmp');
        foreach ($struc as $key => $ind) {
            usort($ind, [$this, 'sortfiles']);
            $struc[$key] = $ind;
        }

        $tempstruc = $struc;
        $struc = ['/' => $tempstruc['/']];
        $bv = 0;
        foreach ($tempstruc as $key => $ind) {
            $save = $key;
            if ($key != '/') {
                $struc['/'] = $this->setupDirs($struc['/'], explode('/', $key), $tempstruc[$key]);
            }
        }
        uksort($struc['/'], [$this, 'mystrucsort']);

        return $struc;
    }
148224
public function findAll() : array
    {
        $objectsData = $this->objectDataRepository->findAll();

        $objects = [];
        foreach ($objectsData as $objectData) {
            $object = $this->getOrCreateObject($objectData);

            if ($object === null) {
                throw new InvalidArgumentException('Could not create object.');
            }

            $objects[] = $object;
        }

        return $objects;
    }
167185
public function getCompilerPasses(): array
    {
        $mappingBagProvider = $this->getMappingBagProvider();

        return $mappingBagProvider instanceof MappingBagProvider
            ? array_merge(
                parent::getCompilerPasses(),
                [new MappingCompilerPass($mappingBagProvider)]
            )
            : parent::getCompilerPasses();
    }
1135771
public function files()
    {
        $files = [];
        foreach (call_user_func($this->callable) as $file) {
            $path = $this->scanner->find($file);
            if ($path === false) {
                throw new RuntimeException("Could not locate {$file} for {$this->callable} in any configured path.");
            }
            $files[] = new Local($path);
        }
        return $files;
    }
1285154
public function getModelFiles()
    {
        $files = [];

        foreach ($this->getOrm()->getComponents() as $component) {
            if ($component instanceof AppInterface) {
                $fileHandler = new FileHandler($component->getModelsPath());
                $files[$component->getName()] = $fileHandler->readDir('php');
            }
        }

        return $files;
    }
218538
public function getFileHandlersAsArray()
    {

        // initialize the array for the file handlers
        $fileHandlers = array();

        // iterate over the file handlers nodes and sort them into an array
        /** @var \AppserverIo\Appserver\Core\Api\Node\FileHandlerNode $fileHandler */
        foreach ($this->getFileHandlers() as $fileHandler) {
            $fileHandlers[$fileHandler->getExtension()] = array(
                'name' => $fileHandler->getName(),
                'params' => $fileHandler->getParamsAsArray()
            );
        }

        // return what we got
        return $fileHandlers;
    }
828241
public static function toList()
    {
        $class = static::class;
        if (!array_key_exists($class, self::$cache)) {
            $reflection = new \ReflectionClass($class);
            self::$cache[$class] = $reflection->getConstants();
        }

        return self::$cache[$class];
    }
593133
public function getFiles()
    {
        $iterator = new RecursiveDirectoryIterator(
            $this->directory,
            FilesystemIterator::SKIP_DOTS
        );
        $iterator = new RecursiveIteratorIterator($iterator);
        $iterator->rewind();

        return $iterator;
    }
1278433
public function getList(): ListInterface
    {
        $repository = $this->getRepository();

        if (!$repository instanceof AbstractRepository) {
            throw new InvalidRepositoryException(sprintf(
                'Repository must be instance of `%s` instance of `%s` given.',
                AbstractRepository::class, null === $repository ? 'NULL' : get_class($repository)
            ));
        }

        if ('' !== $this->getPageParam()) {
            $this->setPage($this->listRequest->getPage($this->getPageParam(), $this->getPage()));
        }

        if ('' !== $this->getLimitParam()) {
            $this->setLimit($this->listRequest->getLimit($this->getLimitParam(), $this->getLimit()));
        }

        $this->mergeOptions();

        $list = $this->createList();
        $list->load();

        return $list;
    }