PHP 클래스 Phergie_Plugin_Db, phergie

상속: extends Phergie_Plugin_Abstract
파일 보기 프로젝트 열기: phergie/phergie

공개 메소드들

메소드 설명
createTable ( String $db, String $sql ) : void Creates database table
createTablesFromSchema ( String $db, String $file ) : void Loads the schema file into array then searches for each table and if not found creates the table
dropTable ( string $db, string $name ) : boolean Drops a table
hasTable ( String $db, String $name ) : boolean Validates that database table exists
init ( string $directory, string $dbFile, string $schemaFile ) : object Initializes database and creates directories if needed
isResourceDirectory ( string $directory ) : void fully specified file name as string used to check that the resource directory does exist
isSchemaFile ( string $file ) : void fully specified file name as string used to check that the schema file does exist
onLoad ( ) : void Checks to see if the necessary extensions are loaded.
validateSqlType ( string $sql, string $type ) : boolean Supply sql statement and one word type parameter (IE, create, update, insert, delete) and the method will validate that the sql contains that syntax

비공개 메소드들

메소드 설명
_debug ( String $message ) : void Jared's crap debug method
_doesPdoExist ( ) : void Validates that the Pdo Extenstion Exists.

메소드 상세

createTable() 공개 메소드

@param String $db database reference
public createTable ( String $db, String $sql ) : void
$db String
$sql String create table sql statement @return void
리턴 void

createTablesFromSchema() 공개 메소드

Loads the schema file into array then searches for each table and if not found creates the table
public createTablesFromSchema ( String $db, String $file ) : void
$db String Database Table
$file String Filename
리턴 void

dropTable() 공개 메소드

TODO Desc
public dropTable ( string $db, string $name ) : boolean
$db string Database name
$name string Table name
리턴 boolean True on success

hasTable() 공개 메소드

@param String $db database name
public hasTable ( String $db, String $name ) : boolean
$db String
$name String table name @return bool
리턴 boolean

init() 공개 메소드

@param string $directory plugin name
public init ( string $directory, string $dbFile, string $schemaFile ) : object
$directory string
$dbFile string database name @param string $schemaFile schema filename @return object
$schemaFile string
리턴 object

isResourceDirectory() 공개 메소드

fully specified file name as string used to check that the resource directory does exist
public isResourceDirectory ( string $directory ) : void
$directory string Directory to check
리턴 void

isSchemaFile() 공개 메소드

fully specified file name as string used to check that the schema file does exist
public isSchemaFile ( string $file ) : void
$file string File to check
리턴 void

onLoad() 공개 메소드

@return void
public onLoad ( ) : void
리턴 void

validateSqlType() 공개 메소드

Supply sql statement and one word type parameter (IE, create, update, insert, delete) and the method will validate that the sql contains that syntax
public validateSqlType ( string $sql, string $type ) : boolean
$sql string TODO Desc
$type string TODO Desc
리턴 boolean