本文整理汇总了PHP中AbstractModel类的典型用法代码示例。如果您正苦于以下问题:PHP AbstractModel类的具体用法?PHP AbstractModel怎么用?PHP AbstractModel使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了AbstractModel类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: visit
/**
* @param AbstractModel $model
* @param null $arg unused
* @param boolean $bool indicates whether to use section tag or not
* @return mixed
*/
public function visit(AbstractModel $model, $arg, $bool)
{
if (array_key_exists('style', $model->config)) {
Head::getInstance()->link($model->config['style']);
}
return $model->accept($this, $arg, $bool);
}
示例2: __construct
public function __construct($paramId = NULL, $paramIsCreateRecordsetInDatabaseIfKeyDoesntExist = AbstractModel::DEFAULT_IS_CREATE_RECORDSET_IN_DATABASE_IF_KEY_DOESNT_EXIST)
{
parent::__construct($paramId, $paramIsCreateRecordsetInDatabaseIfKeyDoesntExist);
//Tables filles
$this->setModelFta(new FtaModel($this->getDataField(self::FIELDNAME_ID_FTA)->getFieldValue(), DatabaseRecord::VALUE_DONT_CREATE_RECORD_IN_DATABASE_IF_KEY_DOESNT_EXIST));
$this->setModelFtaChapitre(new FtaChapitreModel($this->getDataField(self::FIELDNAME_ID_FTA_CHAPITRE)->getFieldValue(), DatabaseRecord::VALUE_DONT_CREATE_RECORD_IN_DATABASE_IF_KEY_DOESNT_EXIST));
}
示例3: getAllBidbyId
public static function getAllBidbyId($id)
{
$select = new SelectPDO();
$select->from("bid", ["bid.*", "lot.title", "user.first_name", "user.last_Name"])->where("`bid`.`lot_id` = ?", array($id))->join("lot", "lot_id", "id")->join("user", "user_id", "id");
$data = AbstractModel::getOnComplexQuery($select);
return $data;
}
示例4: __construct
public function __construct($paramId = NULL, $paramIsCreateRecordsetInDatabaseIfKeyDoesntExist = AbstractModel::DEFAULT_IS_CREATE_RECORDSET_IN_DATABASE_IF_KEY_DOESNT_EXIST)
{
parent::__construct($paramId, $paramIsCreateRecordsetInDatabaseIfKeyDoesntExist);
$this->setModelFtaWorkflow(new FtaWorkflowModel($this->getDataField(self::FIELDNAME_ID_FTA_WORKFLOW)->getFieldValue(), DatabaseRecord::VALUE_DONT_CREATE_RECORD_IN_DATABASE_IF_KEY_DOESNT_EXIST));
$this->setModelFtaRole(new FtaRoleModel($this->getDataField(self::FIELDNAME_ID_FTA_ROLE)->getFieldValue(), DatabaseRecord::VALUE_DONT_CREATE_RECORD_IN_DATABASE_IF_KEY_DOESNT_EXIST));
$this->setModelFtaProcessus(new FtaProcessusModel($this->getDataField(self::FIELDNAME_ID_FTA_PROCESSUS)->getFieldValue(), DatabaseRecord::VALUE_DONT_CREATE_RECORD_IN_DATABASE_IF_KEY_DOESNT_EXIST));
$this->setModelFtaChapitre(new FtaChapitreModel($this->getDataField(self::FIELDNAME_ID_FTA_CHAPITRE)->getFieldValue(), DatabaseRecord::VALUE_DONT_CREATE_RECORD_IN_DATABASE_IF_KEY_DOESNT_EXIST));
}
示例5: __construct
public function __construct($paramId = NULL, $paramIsCreateRecordsetInDatabaseIfKeyDoesntExist = AbstractModel::DEFAULT_IS_CREATE_RECORDSET_IN_DATABASE_IF_KEY_DOESNT_EXIST)
{
parent::__construct($paramId, $paramIsCreateRecordsetInDatabaseIfKeyDoesntExist);
$this->setModelProcessusInit(new FtaProcessusModel($this->getDataField(self::FIELDNAME_PROCESSUS_INIT)->getFieldValue(), DatabaseRecord::VALUE_DONT_CREATE_RECORD_IN_DATABASE_IF_KEY_DOESNT_EXIST));
$this->setModelProcessusNext(new FtaProcessusModel($this->getDataField(self::FIELDNAME_PROCESSUS_NEXT)->getFieldValue(), DatabaseRecord::VALUE_DONT_CREATE_RECORD_IN_DATABASE_IF_KEY_DOESNT_EXIST));
$this->setModelFtaEtat(new FtaEtatModel($this->getDataField(self::FIELDNAME_FTA_ETAT)->getFieldValue(), DatabaseRecord::VALUE_DONT_CREATE_RECORD_IN_DATABASE_IF_KEY_DOESNT_EXIST));
$this->setModelFtaWorkflowModel(new FtaWorkflowModel($this->getDataField(self::FIELDNAME_WORKFLOW)->getFieldValue(), DatabaseRecord::VALUE_DONT_CREATE_RECORD_IN_DATABASE_IF_KEY_DOESNT_EXIST));
}
示例6: __construct
/**
* Constructor.
*
* @param RequestModel $request Request model
*/
public function __construct(&$request)
{
// Construct the parent class
parent::__construct($request);
// Validate the request parameters
$this->validateRequestParams();
}
示例7: __construct
public function __construct()
{
parent::__construct($this->table);
$this->addField("name", "");
$this->request = new Request();
$this->id = $this->request->cat;
}
示例8: init
function init()
{
parent::init();
$this->setPage(null);
$this->addStickyArguments();
$this->extension = $this->api->getConfig('url_postfix', $this->extension);
}
示例9: delete
/**
* Deletes a invoice and all
* the associated items.
*
* @return bool
*/
public function delete()
{
// Delete the items
$this->item()->delete();
// Delete the invoice
return parent::delete();
}
示例10: init
function init()
{
parent::init();
$this->soap = new SoapClient($this->owner->url, array('trace' => true, 'exceptions' => true));
$this->set('ApiKey', $this->owner->key);
$this->set('ClientID', $this->owner->client);
}
示例11: intervalIsLocked
/**
* @return bool
*/
protected function intervalIsLocked()
{
if ($this->getInitiator() == \Ess\M2ePro\Helper\Data::INITIATOR_USER || $this->getInitiator() == \Ess\M2ePro\Helper\Data::INITIATOR_DEVELOPER) {
return false;
}
return parent::intervalIsLocked();
}
示例12: excludeExtensions
/**
Returns the array of file extensions that are to be ignored during a
directory scan.
\returns RTArray
*/
public function excludeExtensions()
{
if (self::$_excludeExtensions == null) {
self::$_excludeExtensions = Settings::sharedSettings()->objectForKey("exclude_extensions");
}
return self::$_excludeExtensions;
}
示例13: init
function init()
{
parent::init();
if (method_exists($this, 'defineFields')) {
throw $this->exception('model->defineField() is obsolete. Change to init()', 'Obsolete')->addMoreInfo('class', get_class($this));
}
}
示例14: __construct
/**
* @param int $numeroDiretoria
* Uma das constantes {@link Diretoria}::DIRETORIA_*
*
* @throws Exception
*/
public function __construct($numeroDiretoria)
{
$numeroDiretoria = (int) $numeroDiretoria;
if (!isset(self::$diretorias[$numeroDiretoria])) {
throw new Exception('Não existe uma diretoria de número "' . $numeroDiretoria . '".');
}
parent::__construct(array('numero' => $numeroDiretoria, 'sigla' => self::$diretorias[$numeroDiretoria][0], 'nome' => self::$diretorias[$numeroDiretoria][1]));
}
示例15: __construct
public function __construct()
{
parent::__construct($this->table);
$this->addField("email", "");
$this->addField("password", "");
$this->addField("create", "");
$this->addField("update", "");
}