PHP Class DbBaseModel

It's not a part of main library, just an example. And it's pretty poor. Please consider use your own implementation.
Inheritance: extends CI_Model
Afficher le fichier Open project: MUlt1mate/cron-manager

Méthodes publiques

Свойство Type Description
$primary_key
$table_name

Méthodes publiques

Méthode Description
__construct ( )
__get ( $name )
__isset ( $name )
__set ( $name, $value )
attributes ( )
delete ( )
findAll ( $condition = [] )
findAllBySql ( $sql, $binds = null )
findByPk ( $value ) : self | false
findOne ( $condition = [] )
getAttribute ( $name )
getAttributes ( )
getError ( $key )
getErrors ( )
isNewRecord ( )
query ( $condition )
save ( )
setAttribute ( $name, $value )
setAttributes ( $set )
setError ( string $key, string $message = '' )

Méthodes protégées

Méthode Description
afterDelete ( )
afterSave ( )
beforeDelete ( )
beforeSave ( )
getDb ( )
insert ( )
setIsNewRecord ( $set )
update ( )

Method Details

__construct() public méthode

public __construct ( )

__get() public méthode

public __get ( $name )

__isset() public méthode

public __isset ( $name )

__set() public méthode

public __set ( $name, $value )

afterDelete() protected méthode

protected afterDelete ( )

afterSave() protected méthode

protected afterSave ( )

attributes() public méthode

public attributes ( )

beforeDelete() protected méthode

protected beforeDelete ( )

beforeSave() protected méthode

protected beforeSave ( )

delete() public méthode

public delete ( )

findAll() public static méthode

public static findAll ( $condition = [] )

findAllBySql() public static méthode

public static findAllBySql ( $sql, $binds = null )

findByPk() public static méthode

public static findByPk ( $value ) : self | false
$value
Résultat self | false

findOne() public static méthode

public static findOne ( $condition = [] )

getAttribute() public méthode

public getAttribute ( $name )

getAttributes() public méthode

public getAttributes ( )

getDb() protected static méthode

protected static getDb ( )

getError() public méthode

public getError ( $key )

getErrors() public méthode

public getErrors ( )

insert() protected méthode

protected insert ( )

isNewRecord() public méthode

public isNewRecord ( )

query() public static méthode

public static query ( $condition )

save() public méthode

public save ( )

setAttribute() public méthode

public setAttribute ( $name, $value )

setAttributes() public méthode

public setAttributes ( $set )

setError() public méthode

public setError ( string $key, string $message = '' )
$key string
$message string

setIsNewRecord() protected méthode

protected setIsNewRecord ( $set )

update() protected méthode

protected update ( )

Property Details

$primary_key public_oe static_oe property

public static $primary_key

$table_name public_oe static_oe property

public static $table_name