factory() public static method

Static method to instantiate the code reflection object and return itself to facilitate chaining methods together.
public static factory ( string $code ) : Reflection
$code string
return Reflection
Example #1
0
 public function testBuildGenerator()
 {
     $r = Reflection::factory('Pop\\File\\File');
     $r = Reflection::factory('Pop\\Web\\Session');
     $r = Reflection::factory('Pop\\Dom\\AbstractDom');
     $this->assertTrue($r->isAbstract());
     $r = Reflection::factory('Pop\\Form\\Form');
     $this->assertEquals('Dom', $r->generator()->code()->getParent());
     $r = Reflection::factory('Pop\\Cache\\Adapter\\File');
     $this->assertTrue(is_array($r->getInterfaces()));
 }