本文整理汇总了PHP中DataExtension::__construct方法的典型用法代码示例。如果您正苦于以下问题:PHP DataExtension::__construct方法的具体用法?PHP DataExtension::__construct怎么用?PHP DataExtension::__construct使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类DataExtension
的用法示例。
在下文中一共展示了DataExtension::__construct方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: __construct
public function __construct()
{
$this->allowedStates = self::$allowed_states;
$this->allowedCountries = self::$allowed_countries;
$this->postcodeRegex = self::$postcode_regex;
parent::__construct();
}
示例2: __construct
public function __construct()
{
parent::__construct();
// This may get called before the schema is created.
if (!DB::getConn()->isSchemaUpdating()) {
HtmlEditorConfig::get('cms')->setOption('viewtemplate', ViewTemplate::get()->map('Title')->toArray());
}
}
示例3: __construct
/**
* @param $allowed
*/
public function __construct($allowed)
{
parent::__construct();
if (!is_array($allowed)) {
$allowed = func_get_args();
}
$this->allowed = $allowed;
}
示例4: __construct
/**
* @param Config_ForClass $config
*/
public function __construct(Config_ForClass $config = null)
{
parent::__construct();
$this->config = $config ?: Config::inst()->forClass(__CLASS__);
if ($memLimit = $this->config->get('memory')) {
increase_memory_limit_to($memLimit);
}
}
示例5: array
/**
* @param Array|String $searchFields Comma-separated list (or array) of database column names
* that can be searched on. Used for generation of the database index defintions.
*/
function __construct($searchFields = array())
{
if (is_array($searchFields)) {
$this->searchFields = implode(',', $searchFields);
} else {
$this->searchFields = $searchFields;
}
parent::__construct();
}
示例6: __construct
/**
* @param Array|String $searchFields Comma-separated list (or array) of database column names
* that can be searched on. Used for generation of the database index defintions.
*/
public function __construct($searchFields = array())
{
if (is_array($searchFields)) {
$this->searchFields = '"' . implode('","', $searchFields) . '"';
} else {
$this->searchFields = $searchFields;
}
parent::__construct();
}
示例7: __construct
public function __construct($tab = '', $useCMSFieldsAlways = false, $profileRelation = '')
{
parent::__construct();
$this->tab = $tab;
$this->useCMSFieldsAlways = $useCMSFieldsAlways;
if ($profileRelation) {
static::$connected_relations[] = $profileRelation;
$this->hasSetRelationForHidingFromFieldLists = true;
}
}
示例8: __construct
public function __construct()
{
$this->allowedStates = self::$allowed_states;
$this->allowedCountries = self::$allowed_countries;
if (!empty($customRegex = Config::inst()->get('Addressable', 'set_postcode_regex'))) {
self::set_postcode_regex($customRegex);
}
$this->postcodeRegex = self::$postcode_regex;
parent::__construct();
}
示例9: __construct
public function __construct($name = 'Title', $parentRel = null, $enforceParity = false)
{
parent::__construct();
if (!empty($parentRel)) {
$this->parentRel = $parentRel;
}
if (!empty($name)) {
$this->name = $name;
}
$this->enforceParity = $enforceParity;
}
示例10: __construct
/**
*
*/
public function __construct()
{
parent::__construct();
$appId = Config::inst()->get('VkControllerExtension', 'app_id');
$secret = Config::inst()->get('VkControllerExtension', 'api_secret');
if (!$appId || !$secret) {
return null;
}
if (session_status() !== PHP_SESSION_ACTIVE) {
Session::start();
}
}
示例11: __construct
/**
* @param $destFolder The folder to save the cached site into.
* This needs to be set in framework/static-main.php as well through the {@link $cacheBaseDir} variable.
* @param $fileExtension The file extension to use, e.g 'html'.
* If omitted, then each page will be placed in its own directory,
* with the filename 'index.html'. If you set the extension to PHP, then a simple PHP script will
* be generated that can do appropriate cache & redirect header negotation.
*/
public function __construct($destFolder = 'cache', $fileExtension = null)
{
// Remove trailing slash from folder
if (substr($destFolder, -1) == '/') {
$destFolder = substr($destFolder, 0, -1);
}
$this->destFolder = $destFolder;
if ($fileExtension) {
$this->fileExtension = $fileExtension;
}
parent::__construct();
}
示例12: __construct
public function __construct()
{
parent::__construct();
DataObject::set_validation_enabled(true);
}
示例13: __construct
public function __construct(ContentService $service)
{
$this->service = $service;
parent::__construct();
}
示例14: __construct
public function __construct(ElasticaService $service)
{
$this->service = $service;
parent::__construct();
}
示例15:
/**
* @param Array|String $searchFields Comma-separated list (or array) of database column names
* that can be searched on. Used for generation of the database index defintions.
*/
function __construct($searchFields) {
if(is_array($searchFields)) $this->searchFields = implode(',', $searchFields);
else $this->searchFields = $searchFields;
parent::__construct();
}