本文整理汇总了PHP中AbstractModel::__construct方法的典型用法代码示例。如果您正苦于以下问题:PHP AbstractModel::__construct方法的具体用法?PHP AbstractModel::__construct怎么用?PHP AbstractModel::__construct使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类AbstractModel
的用法示例。
在下文中一共展示了AbstractModel::__construct方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: __construct
/**
* Constructor.
*
* @param RequestModel $request Request model
*/
public function __construct(&$request)
{
// Construct the parent class
parent::__construct($request);
// Validate the request parameters
$this->validateRequestParams();
}
示例2: __construct
public function __construct($paramId = NULL, $paramIsCreateRecordsetInDatabaseIfKeyDoesntExist = AbstractModel::DEFAULT_IS_CREATE_RECORDSET_IN_DATABASE_IF_KEY_DOESNT_EXIST)
{
parent::__construct($paramId, $paramIsCreateRecordsetInDatabaseIfKeyDoesntExist);
$this->setModelFtaById($this->getDataField(self::FIELDNAME_ID_FTA)->getFieldValue());
$this->setModelAnnexeEmballage(new AnnexeEmballageModel($this->getDataField(self::FIELDNAME_ID_ANNEXE_EMBALLAGE)->getFieldValue()));
$this->setNameDataTableToCompare();
}
示例3: __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));
}
示例4: __construct
public function __construct()
{
parent::__construct($this->table);
$this->addField("name", "");
$this->request = new Request();
$this->id = $this->request->cat;
}
示例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
public function __construct()
{
parent::__construct($this->table);
$this->addField("email", "");
$this->addField("password", "");
$this->addField("create", "");
$this->addField("update", "");
}
示例7: __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);
}
示例8: __construct
public function __construct(\WebPay\WebPay $client, array $data)
{
if (array_key_exists('object', $data)) {
$converter = $this->dataToObjectConverter($client);
$data['object'] = $converter($data['object']);
}
parent::__construct($data);
}
示例9: __construct
/**
* Extend default constructor to provide setFromObject
* @param mixed $data
*/
public function __construct($data = array())
{
if (is_object($data)) {
$this->setFromObject($data);
} else {
parent::__construct($data);
}
}
示例10: __construct
public function __construct($data = null)
{
parent::__construct('user', 'id');
if (!is_null($data)) {
$this->setData($data);
$this->setOriginData($data);
}
}
示例11: __construct
/**
* @param int $serviceCode
* One of the constants {@link ServicoDePostagem}::SERVICE_*
*
* @throws Exception
*/
public function __construct($serviceCode)
{
if (!isset(self::$services[$serviceCode])) {
throw new Exception('There is no service with the code "' . $serviceCode . '".');
}
$service = self::$services[$serviceCode];
parent::__construct(array('codigo' => $serviceCode, 'nome' => $service[0], 'idServico' => $service[1]));
}
示例12: __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]));
}
示例13: __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));
}
示例14: __construct
/**
* @ignore
*/
public function __construct($raw)
{
parent::__construct($raw);
$this->autonomousSystemNumber = $this->get('autonomous_system_number');
$this->autonomousSystemOrganization = $this->get('autonomous_system_organization');
$this->isp = $this->get('isp');
$this->organization = $this->get('organization');
$this->ipAddress = $this->get('ip_address');
}
示例15: __construct
/**
* @ignore
*/
public function __construct($raw)
{
parent::__construct($raw);
$this->isAnonymous = $this->get('is_anonymous');
$this->isAnonymousVpn = $this->get('is_anonymous_vpn');
$this->isHostingProvider = $this->get('is_hosting_provider');
$this->isPublicProxy = $this->get('is_public_proxy');
$this->isTorExitNode = $this->get('is_tor_exit_node');
$this->ipAddress = $this->get('ip_address');
}