PHP Class Scalr_Model

Show file Open project: scalr/scalr Class Usage Examples

Public Properties

Property Type Description
$id

Protected Properties

Property Type Description
$crypto Scalr\Util\CryptoTool
$db ADODB_mysqli
$dbMessageKeyNotFound
$dbPrimaryKey
$dbPropertyMap
$dbTableName 'dbkey' => 'classkey' 'dbkey' => array('property' => 'classkey', 'type' => 'string' (default) or 'bool' or 'datetime' (unixstamp) or serialize (by php), 'is_filter' => true or false, 'update' => true or false, 'updateSql', 'createSql')

Public Methods

Method Description
__call ( $name, $arguments )
__construct ( $id = null )
delete ( $id = null )
getContainer ( ) : Container Gets DI Container
init ( string $className = null ) : Scalr_Model Init
loadBy ( $info )
loadByFilter ( $filterArgs = [], $ufilterArgs = [] )
loadById ( integer $id )
save ( boolean $forceInsert = false ) : Scalr_Model Save current object to database

Protected Methods

Method Description
getCrypto ( ) : Scalr\Util\CryptoTool

Private Methods

Method Description
findDbKeyByProperty ( $property )

Method Details

__call() public method

public __call ( $name, $arguments )

__construct() public method

public __construct ( $id = null )

delete() public method

public delete ( $id = null )

getContainer() public method

Gets DI Container
public getContainer ( ) : Container
return Scalr\DependencyInjection\Container

getCrypto() protected method

protected getCrypto ( ) : Scalr\Util\CryptoTool
return Scalr\Util\CryptoTool

init() public static method

Init
public static init ( string $className = null ) : Scalr_Model
$className string
return Scalr_Model

loadBy() public method

public loadBy ( $info )

loadByFilter() public method

public loadByFilter ( $filterArgs = [], $ufilterArgs = [] )

loadById() public method

public loadById ( integer $id )
$id integer

save() public method

Save current object to database
public save ( boolean $forceInsert = false ) : Scalr_Model
$forceInsert boolean optional Force insert. (false by default)
return Scalr_Model Return current object

Property Details

$crypto protected property

protected CryptoTool,Scalr\Util $crypto
return Scalr\Util\CryptoTool

$db protected property

protected ADODB_mysqli $db
return ADODB_mysqli

$dbMessageKeyNotFound protected property

protected $dbMessageKeyNotFound

$dbPrimaryKey protected property

protected $dbPrimaryKey

$dbPropertyMap protected property

protected $dbPropertyMap

$dbTableName protected property

'dbkey' => 'classkey' 'dbkey' => array('property' => 'classkey', 'type' => 'string' (default) or 'bool' or 'datetime' (unixstamp) or serialize (by php), 'is_filter' => true or false, 'update' => true or false, 'updateSql', 'createSql')
protected $dbTableName

$id public property

public $id