public function send($output, OutputStrategyInterface $outputStrategy = null)
    {
        if (!($outputStrategy instanceof OutputStrategyInterface)) {
            $outputStrategy = $this->defaultOutputStrategy;
        }

        $contentType = new Header(
            Header::CONTENT_TYPE,
            $outputStrategy->getMime()
        );

        $this->header($contentType);

        return $outputStrategy->send($output);
    }
public function send($output, OutputStrategyInterface $outputStrategy = null)
    {
        if (!($outputStrategy instanceof OutputStrategyInterface)) {
            $outputStrategy = $this->defaultOutputStrategy;
        }

        $contentType = new Header(
            Header::CONTENT_TYPE,
            $outputStrategy->getMime()
        );

        $this->header($contentType);

        return $outputStrategy->send($output);
    }
public function send ( $ output , OutputStrategyInterface $ outputStrategy = null ) { if ( ! ( $ outputStrategy instanceof OutputStrategyInterface ) ) { $ outputStrategy = $ this -> defaultOutputStrategy ; } $ contentType = new Header ( Header :: CONTENT_TYPE , $ outputStrategy -> getMime ( ) ) ; $ this -> header ( $ contentType ) ; return $ outputStrategy -> send ( $ output ) ; }
Send the given output using the given or default output strategy.

@param string                  $output
@param OutputStrategyInterface $outputStrategy

@return int
Send the given output using the given or default output strategy .