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;
    }
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;
    }
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 ; }
Returns the list of file contents compactors.

@return CompactorInterface[] The list of compactors.

@throws InvalidArgumentException If a class is not valid.
Returns the list of file contents compactors .