factory() public static method

Static method to instantiate the auth object and return itself to facilitate chaining methods together.
public static factory ( Pop\Auth\Adapter\AdapterInterface $adapter, integer $encryption ) : Auth
$adapter Pop\Auth\Adapter\AdapterInterface
$encryption integer
return Auth
示例#1
0
 public function testConstructor()
 {
     $this->assertInstanceOf('Pop\\Auth\\Auth', new Auth(new File(__DIR__ . '/../tmp/access.txt')));
     $this->assertInstanceOf('Pop\\Auth\\Auth', Auth::factory(new File(__DIR__ . '/../tmp/access.txt')));
 }