/** * Create a new Folder Sharing Info instance * * @param array $data */ public function __construct(array $data) { parent::__construct($data); $this->read_only = $this->getDataProperty('read_only'); $this->shared_folder_id = $this->getDataProperty('shared_folder_id'); $this->parent_shared_folder_id = $this->getDataProperty('parent_shared_folder_id'); }
public function __construct() { parent::__construct(); $this->mapping->table = 'accounts'; $this->bindPhotoModel(); $this->bindAddressModel(); }
public function __construct($params = null) { parent::__construct(); if (isset($params['config'])) { $this->config = $params['config']; } $this->scriptsDir = sprintf('%s/upgrade', $this->config->paths->configs); $this->systems = array('readme', 'base', 'db', 'fs'); $defaults = $this->config->defaults; $this->currentCodeVersion = $defaults->currentCodeVersion; $currentParts = explode('.', $this->currentCodeVersion); $this->currentCodeMajorVersion = $currentParts[0]; $this->currentCodeMinorVersion = $currentParts[1]; $this->currentCodeTrivialVersion = $currentParts[2]; $siteConfig = $this->config->site; if (isset($siteConfig->lastCodeVersion) && !empty($siteConfig->lastCodeVersion)) { $this->lastCodeVersion = $siteConfig->lastCodeVersion; } else { $this->lastCodeVersion = $defaults->lastCodeVersion; } $lastParts = explode('.', $this->lastCodeVersion); $this->lastCodeMajorVersion = $lastParts[0]; $this->lastCodeMinorVersion = $lastParts[1]; $this->lastCodeTrivialVersion = $lastParts[2]; }
public function __construct(array $attributes = array()) { $this->detectInformation(); // Customize Rule parent::__construct($attributes); // TODO: Change the autogenerated stub }
/** * 获取分表中的表名,获取数据库抽象类对象,获取Memcached抽象对象 * @param $pid */ function __construct($pid = '', $persister = false) { parent::__construct($pid); $this->dbConfig = BaseModel::getConfigVar('database'); //v($this->dbConfig); $this->setTable(); $dbName = "default"; $child_classname = get_class($this); if (isset($this->dbConfig['config_map_class'])) { foreach ($this->dbConfig['config_map_class'] as $key => $row) { if (in_array($child_classname, $row)) { $dbName = $key; break; } } } $this->dbName = $dbName; //Slave数据库预连接 if (empty($this->slaveDB)) { $this->slaveDB = $this->dbConnect($dbName, $persister); } //var_dump($this->slaveDB); if (empty($this->masterDB)) { $this->masterDB = $this->dbMasterConnect($dbName, $persister); //Master数据库预连接 } }
function __construct(DibiConnection $connection, ICacheStorage $cache, WidgetParamModel $widgetParamModel) { parent::__construct($connection, $cache); $this->table = 'widget'; $this->widgetParamModel = $widgetParamModel; $this->__cronDelete(); }
public function __construct($id = -1) { parent::__construct(); $q = "SELECT * FROM BRDRequirements WHERE id = {$id}"; $db = new Dbase(); $res = $db->executeQuery($q); if ($res && $res->num_rows > 0) { if ($row = $res->fetch_assoc()) { $this->id = $row['id']; $this->BRD_ref_number = $row['BRD_ref_number']; $this->BRD_date = $row['BRD_date']; $this->approved = $row['approved']; $this->approved_by = $row['approved_by']; $this->approval_date = $row['approval_date']; $this->stakeholders = $row['stakeholders']; $this->stakeholder_BU = $row['stakeholder_BU']; $this->expected_impact_BU = $row['expected_impact_BU']; $this->stakeholder_approved = $row['stakeholder_approved']; $this->stk_app_date = $row['stk_app_date']; $this->responsible = $row['responsible']; $this->accountable = $row['accountable']; $this->consulted = $row['consulted']; $this->informed = $row['informed']; } } $res->free(); }
public function __construct(ConfigurationModel $config, NameModel $nameModel, Library $library) { parent::__construct($config); $this->nameModel = $nameModel; $this->siteId = $config->getSiteId(); $this->library = $library; }
public function __construct($attributes = null) { if (is_array($attributes)) { parent::__construct($attributes); } $this->validators = array('validate_username', 'validate_password'); }
public function __construct($id = -1) { parent::__construct(); $q = "SELECT * FROM RiskMitigationPlan WHERE id = {$id}"; $db = new Dbase(); $res = $db->executeQuery($q); if ($res && $res->num_rows > 0) { if ($row = $res->fetch_assoc()) { $this->id = $row['id']; $this->prelaunch_checklist = $row['prelaunch_checklist']; $this->UAT_required = $row['UAT_required']; $this->UAT_conducted_by = $row['UAT_conducted_by']; $this->UAT_date = $row['UAT_date']; $this->vetted_by_stakeholders = $row['vetted_by_stakeholders']; $this->feedback_taken_from = $row['feedback_taken_from']; $this->feedback = $row['feedback']; $this->feedback_incorporated = $row['feedback_incorporated']; $this->feedback_incorporation_date = $row['feedback_incorporation_date']; $this->final_UAT = $row['final_UAT']; $this->final_UAT_conducted_by = $row['final_UAT_conducted_by']; $this->final_sign_off = $row['final_sign_off']; $this->GTM_sign_off = $row['GTM_sign_off']; $this->SVP_sign_off = $row['SVP_sign_off']; } } $res->free(); }
/** * {@inheritdoc} */ public function __construct($configuration) { parent::__construct($configuration); $this->person = PersonReferenceModel::create($configuration['person']); $this->list = ListReferenceModel::create($configuration['list']); $this->alreadyMember = $configuration['already_member']; }
/** * Create a new CopyReference instance * * @param array $data */ public function __construct(array $data) { parent::__construct($data); $this->expires = new DateTime($this->getDataProperty('expires')); $this->reference = $this->getDataProperty('copy_reference'); $this->setMetadata(); }
public function __construct() { parent::__construct(); $this->apiKey = Yii::app()->params['baiduPushApiKey']; $this->secretKey = Yii::app()->params['baiduPushSecretKey']; $this->channel = new Channel($this->apiKey, $this->secretKey); }
public function __construct($pixie) { parent::__construct($pixie); $this->created_at = date('Y-m-d H:i:s'); $this->status = self::STATUS_NEW; $this->amount = 0; }
public function __construct($params = null) { parent::__construct(); if (isset($params['utility'])) { $this->utility = $params['utility']; } else { $this->utility = new Utility(); } if (isset($params['url'])) { $this->url = $params['url']; } else { $this->url = new Url(); } if (isset($params['image'])) { $this->image = $params['image']; } else { $this->image = getImage(); } if (isset($params['user'])) { $this->user = $params['user']; } else { $this->user = new User(); } if (isset($params['config'])) { $this->config = $params['config']; } }
/** * {@inheritdoc} */ public function __construct($configuration) { parent::__construct($configuration); $this->email = $configuration['email']; $this->dateAdded = new \DateTime($configuration['date_added']); $this->person = PersonModel::create($configuration['person']); }
public function __construct($vitals_data, $conn = NULL, $vitals_id = NULL) { parent::__construct(); $this->vitals_data = $vitals_data; $this->conn = $conn == NULL ? $this->conn : $conn; $this->vitals_id = $vitals_id; }
/** * Create a new SearchResult instance * * @param array $data */ public function __construct(array $data) { parent::__construct($data); $matchType = $this->getDataProperty('match_type'); $this->matchType = isset($matchType['.tag']) ? $matchType['.tag'] : null; $this->setMetadata(); }
function __construct() { parent::__construct(); // @deprecated: to be removed osc_run_hook('init_admin'); osc_run_hook('init_admin_insecure'); }
/** * Sets a new start time and creates an instance * of both the Profile and Message collection * * @return Null */ public function __construct() { parent::__construct(); $this->startTime = microtime(true); $this->profiles = new Collection('GroundSix\\Component\\Model\\Profile'); $this->messages = new Collection('GroundSix\\Component\\Model\\Message'); }
function __construct() { parent::__construct(); $this->mSearch = Search::newInstance(); $this->uri = preg_replace('|^' . REL_WEB_URL . '|', '', $_SERVER['REQUEST_URI']); $this->nice_url = false; if (!stripos($_SERVER['REQUEST_URI'], 'search') && osc_rewrite_enabled()) { $this->nice_url = true; } if ($this->nice_url) { // redirect if it ends with a slash if (preg_match('|/$|', $this->uri)) { $redirectURL = osc_base_url() . $this->uri; $redirectURL = preg_replace('|/$|', '', $redirectURL); $this->redirectTo($redirectURL); } $search_uri = preg_replace('|/[0-9]+$|', '', $this->uri); $this->_exportVariableToView('search_uri', $search_uri); // remove seo_url_search_prefix if (osc_get_preference('seo_url_search_prefix') != '') { $this->uri = str_replace(osc_get_preference('seo_url_search_prefix') . '/', '', $this->uri); } // get page if it's set in the url $iPage = preg_replace('|.*/([0-9]+)$|', '$01', $this->uri); if ($iPage > 0) { Params::setParam('iPage', $iPage); // redirect without number of pages if ($iPage == 1) { $this->redirectTo(osc_base_url() . $search_uri); } } if (Params::getParam('iPage') > 1) { $this->_exportVariableToView('canonical', osc_base_url() . $search_uri); } $params = preg_split('|_|', preg_replace('|.*?/|', '', $search_uri)); if (preg_match('|r([0-9]+)$|', $params[0], $r)) { $region = Region::newInstance()->findByPrimaryKey($r[1]); Params::setParam('sRegion', $region['pk_i_id']); } else { if (preg_match('|c([0-9]+)$|', $params[0], $c)) { $city = City::newInstance()->findByPrimaryKey($c[1]); Params::setParam('sCity', $city['pk_i_id']); } else { Params::setParam('sCategory', $search_uri); } } if (count($params) == 2) { $location = $params[1]; if (preg_match('|r([0-9]+)$|', $location, $r)) { $region = Region::newInstance()->findByPrimaryKey($r[1]); Params::setParam('sRegion', $region['pk_i_id']); } if (preg_match('|c([0-9]+)$|', $location, $c)) { $city = City::newInstance()->findByPrimaryKey($c[1]); Params::setParam('sCity', $city['pk_i_id']); } } } }
function __construct() { parent::__construct(); if (!osc_users_enabled()) { osc_add_flash_error_message(_m('Users not enabled')); $this->redirectTo(osc_base_url(true)); } }
public function __construct() { parent::__construct(); $this->mapping->table = 'products_messages'; if (class_exists('InboxModel')) { $this->inboxModel = new InboxModel(); } }
public function __construct($attributes = array()) { parent::__construct($attributes); $this->purgeFilters[] = function ($key) { $purge = array('captcha'); return !in_array($key, $purge); }; }
/** * Вызывать из потомка!!!, для того, чтобы не передавать в конструктор имя поля * Пример: parent::__construct('photo_id'); */ function __construct($table_name, $field_name, $id = 0) { $this->_object_field_name = $field_name; parent::__construct($table_name); if ((int) $id > 0) { $this->load($id); } }
/** * Create a new DeletedtMetadata instance * * @param array $data */ public function __construct(array $data) { parent::__construct($data); $this->name = $this->getDataProperty('name'); $this->path_lower = $this->getDataProperty('path_lower'); $this->sharing_info = $this->getDataProperty('sharing_info'); $this->path_display = $this->getDataProperty('path_display'); }
function __construct() { parent::__construct(); if (!osc_users_enabled() && ($this->action != 'activate_alert' && $this->action != 'unsub_alert')) { osc_add_flash_error_message(_m('Users not enabled')); $this->redirectTo(osc_base_url(true)); } }
public function __construct(DibiConnection $connection, $app_id, $permissions, $app_secret, $admin_email) { parent::__construct($connection); $this->app_id = $app_id; $this->permissions = $permissions; $this->app_secret = $app_secret; $this->admin_email = $admin_email; }
public function __construct() { parent::__construct(); $this->mapping->table = 'users'; if (class_exists('RoleModel')) { $this->roleModel = new RoleModel($this->dbh); } }
public function __construct($action, $isPost = false, $params = array()) { parent::__construct(include 'conf/config.php'); if ($isPost) { call_user_func_array(array($this, $action . '_POST'), $params); } else { call_user_func_array(array($this, $action), $params); } }