本文整理汇总了PHP中AbstractModel::init方法的典型用法代码示例。如果您正苦于以下问题:PHP AbstractModel::init方法的具体用法?PHP AbstractModel::init怎么用?PHP AbstractModel::init使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类AbstractModel
的用法示例。
在下文中一共展示了AbstractModel::init方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: 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));
}
}
示例2: 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);
}
示例3: init
function init()
{
parent::init();
$this->setPage(null);
$this->addStickyArguments();
$this->extension = $this->api->getConfig('url_postfix', $this->extension);
}
示例4: init
function init()
{
parent::init();
$this->template = $this->add('SMlite');
$this->template->loadTemplateFromString($this->getXML());
$timestamp = strftime("%Y%m%d%H%M%S");
$this->set('orderid', $timestamp . "-" . mt_rand(1, 999));
$this->set('merchantid', $this->api->getConfig('billing/realex/merchantid'));
$this->set('timestamp', $timestamp);
$this->set('account', $this->api->getConfig('billing/realex/account'));
}
示例5: init
function init()
{
parent::init();
if (!isset($this->api->pm)) {
throw $this->exception('You must initialize PageManager first');
}
if (!$this->api->pm->base_url) {
throw $this->exception('PageManager is did not parse request URL. Use either parseRequestedURL or setURL (if you are in CLI application)');
}
$this->addStickyArguments();
$this->extension = $this->api->getConfig('url_postfix', $this->extension);
}
示例6: init
public function init()
{
parent::init();
// Initialize template of this part
$t = $this->defaultTemplate();
$this->template = $this->add($this->owner->template_class);
/** @type TMail_Template $this->template */
$this->template->loadTemplate($t[0], '.mail');
if ($t[1]) {
$this->template = $this->template->cloneRegion($t[1]);
}
}
示例7: init
public function init()
{
parent::init();
/** @type TMail_Template $master_template */
$master_template = $this->add($this->template_class);
$master_template->loadTemplate('shared', '.mail');
$this->template = $master_template->cloneRegion('body');
$this->headers = $master_template->cloneRegion('headers');
$this->boundary = str_replace('.', '', uniqid('atk4tmail', true));
if ($t = $this->app->getConfig('tmail/transport', false)) {
$this->addTransport($t);
}
}
示例8: init
/**
* init
*
* @return void
*/
function init()
{
parent::init();
// first let's see if we authenticate
if ($this->authenticate === true || $this->authenticate !== false && ($this->hasMethod('authenticate') || $this->app->hasMethod('authenticate'))) {
$result = false;
if ($this->hasMethod('authenticate')) {
$result = $this->authenticate();
}
if (!$result && $this->app->hasMethod('authenticate')) {
$result = $this->app->authenticate();
}
if (!$result) {
throw $this->exception('Authentication Failed', null, 403);
}
if (is_object($result)) {
$this->user = $result;
}
}
$m = $this->_model();
if ($m) {
$this->setModel($m);
}
}
示例9: init
/**
* Initialization of the object
*
* @return void
*/
function init()
{
parent::init();
$this->debug('ProcessIO initialised, setting descriptor options');
$this->descriptorspec = array(0 => array("pipe", "r"), 1 => array("pipe", "w"), 2 => array("pipe", "w"));
}
示例10: init
function init()
{
parent::init();
$this->cache =& $this->api->smlite_cache;
$this->settings = array_merge($this->getDefaultSettings(), $this->api->getConfig('template', array()));
}
示例11: init
function init()
{
parent::init();
$this->relative_path = $this->short_name;
if ($this->short_name[0] == '/' || strlen($this->short_name) > 1 && $this->short_name[1] == ':') {
// Absolute path. Independent from base_location
} else {
$this->setParent($this->owner->base_location);
}
}
示例12: init
function init()
{
parent::init();
$this->table_alias = $this->short_name;
}
示例13: init
public function init()
{
parent::init();
}
示例14: init
/**
* Initialization of the object.
*/
public function init()
{
parent::init();
$this->debug('ProcessIO initialised, setting descriptor options');
$this->descriptorspec = array(0 => array('pipe', 'r'), 1 => array('pipe', 'w'), 2 => array('pipe', 'w'));
}
示例15: init
function init()
{
parent::init();
$path = array();
$this->cache =& $this->app->smlite_cache;
$this->settings = $this->getDefaultSettings();
$this->settings['extension'] = $this->app->getConfig('smlite/extension', '.html');
}