本文整理汇总了PHP中AbstractModel类的典型用法代码示例。如果您正苦于以下问题:PHP AbstractModel类的具体用法?PHP AbstractModel怎么用?PHP AbstractModel使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了AbstractModel类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的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);
}
开发者ID:phgamper,项目名称:markdown_blog,代码行数:13,代码来源:OnePager.php
示例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));
}
开发者ID:SalokineTerata,项目名称:intranet,代码行数:7,代码来源:FtaSuiviProjetModel.php
示例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;
}
开发者ID:Kit-kat1,项目名称:Auction_bootstrap,代码行数:7,代码来源:bid.php
示例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));
}
开发者ID:SalokineTerata,项目名称:intranet,代码行数:8,代码来源:FtaWorkflowStructureModel.php
示例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));
}
开发者ID:SalokineTerata,项目名称:intranet,代码行数:8,代码来源:FtaProcessusCycleModel.php
示例6: intro
public function intro()
{
$articles = AbstractModel::all();
foreach ($articles as $article) {
$article->intro = substr($article->content, 0, 17);
}
return $articles;
}
开发者ID:PierreCurie,项目名称:PHP2_A_ST,代码行数:8,代码来源:articles.php
示例7: __construct
/**
* Constructor.
*
* @param RequestModel $request Request model
*/
public function __construct(&$request)
{
// Construct the parent class
parent::__construct($request);
// Validate the request parameters
$this->validateRequestParams();
}
开发者ID:geo4web-testbed,项目名称:topic2,代码行数:12,代码来源:ModuleModel.php
示例8: __construct
public function __construct()
{
parent::__construct($this->table);
$this->addField("name", "");
$this->request = new Request();
$this->id = $this->request->cat;
}
开发者ID:Kit-kat1,项目名称:Auction_bootstrap,代码行数:7,代码来源:category.php
示例9: init
function init()
{
parent::init();
$this->setPage(null);
$this->addStickyArguments();
$this->extension = $this->api->getConfig('url_postfix', $this->extension);
}
开发者ID:xavocvijay,项目名称:atkschool,代码行数:7,代码来源:URL.php
示例10: 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();
}
开发者ID:mladjom,项目名称:smartinvoice,代码行数:13,代码来源:Invoice.php
示例11: 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);
}
开发者ID:xavoctechnocratspvtltd,项目名称:svc,代码行数:7,代码来源:generic.php
示例12: 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();
}
开发者ID:Doability,项目名称:magento2dev,代码行数:10,代码来源:Cancellation.php
示例13: 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;
}
开发者ID:nbalonso,项目名称:MunkiFace,代码行数:12,代码来源:AbstractModel.php
示例14: 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));
}
}
开发者ID:romaninsh,项目名称:Agile-Postfix-Admin,代码行数:7,代码来源:Model.php
示例15: __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]));
}
开发者ID:rafaelsiqueira,项目名称:php-sigep,代码行数:14,代码来源:Diretoria.php
示例16: __construct
public function __construct()
{
parent::__construct($this->table);
$this->addField("email", "");
$this->addField("password", "");
$this->addField("create", "");
$this->addField("update", "");
}
开发者ID:Kit-kat1,项目名称:Auction_bootstrap,代码行数:8,代码来源:admin.php
示例17: __construct
public function __construct($data = null)
{
parent::__construct('user', 'id');
if (!is_null($data)) {
$this->setData($data);
$this->setOriginData($data);
}
}
开发者ID:swnsma,项目名称:coursework3.1,代码行数:8,代码来源:User.php
示例18: __construct
public function __construct(\WebPay\WebPay $client, array $data)
{
if (array_key_exists('data', $data) && !empty($data['data'])) {
$converter = $this->dataToObjectConverter($client);
$data['data'] = array_map($converter, $data['data']);
}
parent::__construct($data);
}
开发者ID:jphacks,项目名称:KB_10,代码行数:8,代码来源:EntityList.php
示例19: getDb
/**
* Создаем объект для работы с базой данных.
* @возвращаем object.
*/
public static function getDb()
{
if (empty(self::$dbd)) {
$config = Config::$db;
self::$dbd = new PDO('mysql:host=' . $config['host'] . ';dbname=' . $config['db'] . ';charset=UTF8', $config['login'], $config['password'], array(PDO::MYSQL_ATTR_INIT_COMMAND => 'SET NAMES UTF8'));
}
return self::$dbd;
}
开发者ID:bionicle12,项目名称:testsite,代码行数:12,代码来源:AbstractModel.php
示例20: isPossibleToRun
protected function isPossibleToRun()
{
if (!parent::isPossibleToRun()) {
return false;
}
$params = $this->getParams();
return $this->getHelper('Component\\Ebay\\Motors')->isMarketplaceSupportsKtype($params['marketplace_id']);
}
开发者ID:Doability,项目名称:magento2dev,代码行数:8,代码来源:MotorsKtypes.php
注:本文中的AbstractModel类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论