Pop\Db\Sql::factory PHP Method

factory() public static method

Static method to instantiate the SQL object and return itself to facilitate chaining methods together.
public static factory ( Db $db, mixed $table = null, string $alias = null ) : Sql
$db Db
$table mixed
$alias string
return Sql
    public static function factory(Db $db, $table = null, $alias = null)
    {
        return new self($db, $table, $alias);
    }

Usage Example

Exemplo n.º 1
0
 public function testIsNotNull()
 {
     $p = new Predicate(Sql::factory(Db::factory('Sqlite', array('database' => __DIR__ . '/../tmp/test.sqlite')), 'users'));
     $p->isNotNull('email');
     $this->assertEquals('("email" IS NOT NULL)', (string) $p);
 }
All Usage Examples Of Pop\Db\Sql::factory