Pop\Db\Db::factory PHP 메소드

factory() 공개 정적인 메소드

Determine whether or not an instance of the DB object exists already, and instantiate the object if it doesn't exist.
public static factory ( string $type, array $options, string $prefix = 'Pop\Db\Adapter\' ) : Db
$type string
$options array
$prefix string
리턴 Db
    public static function factory($type, array $options, $prefix = 'Pop\\Db\\Adapter\\')
    {
        return new self($type, $options, $prefix);
    }

Usage Example

예제 #1
0
 public function testAddFieldsFromTableException()
 {
     $this->setExpectedException('Pop\\Form\\Exception');
     Users::setDb(Db::factory('Sqlite', array('database' => __DIR__ . '/../tmp/test.sqlite')));
     $f = Fields::factory(array());
     $f->addFieldsFromTable(array());
 }
All Usage Examples Of Pop\Db\Db::factory