public function createMode($throwException = false, $forceMode = false)
    {
        if (false === $this->enabled && true !== $forceMode) {
            return new NullMode();
        }

        switch ($this->type) {
            case 'apache':
            case 'apache2':
                return new Apache($this->mapping);
            case 'nginx':
                return new Nginx($this->mapping);
            default:
                $this->logger->error('Invalid h264 pseudo streaming configuration.');
                if ($throwException) {
                    throw new InvalidArgumentException(sprintf('Invalid h264 pseudo streaming configuration width type "%s"', $this->type));
                }

                return new NullMode();
        }
    }
public function createMode($throwException = false, $forceMode = false)
    {
        if (false === $this->enabled && true !== $forceMode) {
            return new NullMode();
        }

        switch ($this->type) {
            case 'apache':
            case 'apache2':
                return new Apache($this->mapping);
            case 'nginx':
                return new Nginx($this->mapping);
            default:
                $this->logger->error('Invalid h264 pseudo streaming configuration.');
                if ($throwException) {
                    throw new InvalidArgumentException(sprintf('Invalid h264 pseudo streaming configuration width type "%s"', $this->type));
                }

                return new NullMode();
        }
    }
public function createMode ( $ throwException = false , $ forceMode = false ) { if ( false === $ this -> enabled && true !== $ forceMode ) { return new NullMode ( ) ; } switch ( $ this -> type ) { case 'apache' : case 'apache2' : return new Apache ( $ this -> mapping ) ; case 'nginx' : return new Nginx ( $ this -> mapping ) ; default : $ this -> logger -> error ( 'Invalid h264 pseudo streaming configuration.' ) ; if ( $ throwException ) { throw new InvalidArgumentException ( sprintf ( 'Invalid h264 pseudo streaming configuration width type "%s"' , $ this -> type ) ) ; } return new NullMode ( ) ; } }
Returns a new instance of H264Interface.

@return H264Interface

@throws InvalidArgumentException if mode type is unknown
Returns a new instance of H264Interface .