factory() public static method

Creates a new instance of a class using a string ID.
public static factory ( string $classId ) : Piwik\DataTable\Renderer
$classId string The ID of the class.
return Piwik\DataTable\Renderer
Example #1
0
 /**
  * @expectedException \Exception
  * @expectedExceptionMessage Invalid class ID
  */
 public function testCreatingInvalidClassThrows()
 {
     BaseFactory::factory("This\\Class\\Does\\Not\\Exist");
 }