PHP 인터페이스 phpDataMapper_Adapter_Interface, phpDataMapper

파일 보기 프로젝트 열기: vlucas/phpDataMapper

공개 메소드들

메소드 설명
__construct ( mixed $host, string $datasource = null, string $username = null, string $password = null, array $options = [] ) : void
connection ( ) Get database connection
create ( $source, array $data ) Insert entity
createDatabase ( $database ) Create a database Will throw errors if user does not have proper permissions
dateFormat ( ) Get database DATE format for PHP date() function
dateTimeFormat ( ) Get database full DATETIME for PHP date() function
delete ( $source, array $where ) Delete entity
dropDatabase ( $database ) Drop an entire database Destructive and dangerous - drops entire table and all data Will throw errors if user does not have proper permissions
dropDatasource ( $source ) Drop/delete data source (table for SQL) Destructive and dangerous - drops entire data source and all data
escape ( string $string ) Escape/quote direct user input
read ( phpDataMapper_Query $query ) Read from data source using given query object
timeFormat ( ) Get database TIME format for PHP date() function
truncateDatasource ( $source ) Truncate data source (table for SQL) Should delete all rows and reset serial/auto_increment keys to 0
update ( $source, array $data, array $where = [] ) Update entity

메소드 상세

__construct() 공개 메소드

public __construct ( mixed $host, string $datasource = null, string $username = null, string $password = null, array $options = [] ) : void
$host mixed Host string or pre-existing PDO object
$datasource string Optional if $host is PDO object
$username string Optional if $host is PDO object
$password string Optional if $host is PDO object
$options array
리턴 void

connection() 공개 메소드

Get database connection
public connection ( )

create() 공개 메소드

Insert entity
public create ( $source, array $data )
$data array

createDatabase() 공개 메소드

Create a database Will throw errors if user does not have proper permissions
public createDatabase ( $database )

dateFormat() 공개 메소드

Get database DATE format for PHP date() function
public dateFormat ( )

dateTimeFormat() 공개 메소드

Get database full DATETIME for PHP date() function
public dateTimeFormat ( )

delete() 공개 메소드

Delete entity
public delete ( $source, array $where )
$where array

dropDatabase() 공개 메소드

Drop an entire database Destructive and dangerous - drops entire table and all data Will throw errors if user does not have proper permissions
public dropDatabase ( $database )

dropDatasource() 공개 메소드

Drop/delete data source (table for SQL) Destructive and dangerous - drops entire data source and all data
public dropDatasource ( $source )

escape() 공개 메소드

Escape/quote direct user input
public escape ( string $string )
$string string

read() 공개 메소드

Read from data source using given query object
public read ( phpDataMapper_Query $query )
$query phpDataMapper_Query

timeFormat() 공개 메소드

Get database TIME format for PHP date() function
public timeFormat ( )

truncateDatasource() 공개 메소드

Truncate data source (table for SQL) Should delete all rows and reset serial/auto_increment keys to 0
public truncateDatasource ( $source )

update() 공개 메소드

Update entity
public update ( $source, array $data, array $where = [] )
$data array
$where array