factory() public static méthode

public static factory ( string $format, array $request ) : ApiRenderer
$format string
$request array
Résultat ApiRenderer
 /**
  * @param string $outputFormat
  * @param array $request
  */
 public function __construct($outputFormat, $request = array())
 {
     $this->outputFormat = $outputFormat;
     $this->request = $request;
     $this->apiRenderer = ApiRenderer::factory($outputFormat, $request);
 }
Exemple #2
0
 /**
  * @expectedException \Exception
  * @expectedExceptionMessage General_ExceptionInvalidRendererFormat
  */
 public function test_factory_shouldThrowAnException_IfInvalidFormatGiven()
 {
     ApiRenderer::factory('phpi', array());
 }