PHP 클래스 FluentPDO, fluentpdo

파일 보기 프로젝트 열기: fpdo/fluentpdo 1 사용 예제들

공개 프로퍼티들

프로퍼티 타입 설명
$convertTypes boolean
$debug boolean | callback

보호된 프로퍼티들

프로퍼티 타입 설명
$pdo PDO
$structure FluentStructure | null

공개 메소드들

메소드 설명
__construct ( PDO $pdo, FluentStructure $structure = null ) FluentPDO constructor.
close ( ) : null Closes the \PDO connection to the database
delete ( string $table, string $primaryKey = null ) : DeleteQuery Create DELETE query
deleteFrom ( string $table, string $primaryKey = null ) : DeleteQuery Create DELETE FROM query
from ( string $table, integer $primaryKey = null ) : SelectQuery Create SELECT query from $table
getPdo ( ) : PDO
getStructure ( ) : FluentStructure
insertInto ( string $table, array $values = [] ) : InsertQuery Create INSERT INTO query
update ( string $table, array | string $set = [], string $primaryKey = null ) : UpdateQuery Create UPDATE query

메소드 상세

__construct() 공개 메소드

FluentPDO constructor.
public __construct ( PDO $pdo, FluentStructure $structure = null )
$pdo PDO
$structure FluentStructure

close() 공개 메소드

Closes the \PDO connection to the database
public close ( ) : null
리턴 null

delete() 공개 메소드

Create DELETE query
public delete ( string $table, string $primaryKey = null ) : DeleteQuery
$table string
$primaryKey string delete only row by primary key
리턴 DeleteQuery

deleteFrom() 공개 메소드

Create DELETE FROM query
public deleteFrom ( string $table, string $primaryKey = null ) : DeleteQuery
$table string
$primaryKey string
리턴 DeleteQuery

from() 공개 메소드

Create SELECT query from $table
public from ( string $table, integer $primaryKey = null ) : SelectQuery
$table string - db table name
$primaryKey integer - return one row by primary key
리턴 SelectQuery

getPdo() 공개 메소드

public getPdo ( ) : PDO
리턴 PDO

getStructure() 공개 메소드

public getStructure ( ) : FluentStructure
리턴 FluentStructure

insertInto() 공개 메소드

Create INSERT INTO query
public insertInto ( string $table, array $values = [] ) : InsertQuery
$table string
$values array - accepts one or multiple rows, @see docs
리턴 InsertQuery

update() 공개 메소드

Create UPDATE query
public update ( string $table, array | string $set = [], string $primaryKey = null ) : UpdateQuery
$table string
$set array | string
$primaryKey string
리턴 UpdateQuery

프로퍼티 상세

$convertTypes 공개적으로 프로퍼티

public bool $convertTypes
리턴 boolean

$debug 공개적으로 프로퍼티

public bool|callback $debug
리턴 boolean | callback

$pdo 보호되어 있는 프로퍼티

protected PDO $pdo
리턴 PDO

$structure 보호되어 있는 프로퍼티

protected FluentStructure|null $structure
리턴 FluentStructure | null