当前位置: 首页>>代码示例>>PHP>>正文


PHP Element::__construct方法代码示例

本文整理汇总了PHP中Element::__construct方法的典型用法代码示例。如果您正苦于以下问题:PHP Element::__construct方法的具体用法?PHP Element::__construct怎么用?PHP Element::__construct使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Element的用法示例。


在下文中一共展示了Element::__construct方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: __construct

 public function __construct($name = null, $owner = null, $caption = null, $rows = null)
 {
     parent::__construct($name, $owner);
     $this->tag = "table";
     $this->summary = $this->caption = $caption;
     $this->rows = $rows;
 }
开发者ID:popytka008,项目名称:classes,代码行数:7,代码来源:Table.php

示例2:

 function __construct($name = "", $note = "", $element = null, $parse = Element::PARSE_MODE_JAVA)
 {
     parent::__construct($parse);
     $this->name = $name;
     $this->note = $note;
     $this->element = $element;
 }
开发者ID:huqitao,项目名称:php_api_document,代码行数:7,代码来源:DataHttpElement.php

示例3: __construct

 public function __construct()
 {
     parent::__construct();
     // load widgetkit
     require_once JPATH_ADMINISTRATOR . '/components/com_widgetkit/widgetkit.php';
     $this->widgetkit = Widgetkit::getInstance();
 }
开发者ID:ziyou-liu,项目名称:1line,代码行数:7,代码来源:widgetkit.php

示例4: __construct

 /**
  * Creates a new, empty form with some default attributes
  *
  * @param array $attributes
  */
 public function __construct($attributes = array())
 {
     global $ID;
     parent::__construct('form', $attributes);
     // use the current URL as default action
     if (!$this->attr('action')) {
         $get = $_GET;
         if (isset($get['id'])) {
             unset($get['id']);
         }
         $self = wl($ID, $get, false, '&');
         //attributes are escaped later
         $this->attr('action', $self);
     }
     // post is default
     if (!$this->attr('method')) {
         $this->attr('method', 'post');
     }
     // we like UTF-8
     if (!$this->attr('accept-charset')) {
         $this->attr('accept-charset', 'utf-8');
     }
     // add the security token by default
     $this->setHiddenField('sectok', getSecurityToken());
     // identify this as a new form based form in HTML
     $this->addClass('doku_form');
 }
开发者ID:janzoner,项目名称:dokuwiki,代码行数:32,代码来源:Form.php

示例5: foreach

 function __construct($variables)
 {
     global $parametersMod;
     $this->regExpression = '/^([1-3][0-9]{3,3})-(0?[1-9]|1[0-2])-(0?[1-9]|[1-2][0-9]|3[0-1])\\s([0-1][0-9]|2[0-4]):([0-5][0-9]):([0-5][0-9])$/';
     $this->regExpressionError = $parametersMod->getValue('developer', 'std_mod', 'admin_translations', 'incorrect_date_format');
     $this->type = 'mysql';
     if (!isset($variables['order'])) {
         $variables['order'] = true;
     }
     parent::__construct($variables);
     if (!isset($variables['dbField']) || $variables['dbField'] == '') {
         $backtrace = debug_backtrace();
         if (isset($backtrace[0]['file']) && $backtrace[0]['line']) {
             trigger_error('ElementDateTime dbField parameter not set. (Error source: ' . $backtrace[0]['file'] . ' line: ' . $backtrace[0]['line'] . ' ) ');
         } else {
             trigger_error('ElementDateTime dbField parameter not set.');
         }
         exit;
     }
     foreach ($variables as $name => $value) {
         switch ($name) {
             case 'regExpressionError':
                 $this->regExpressionError = $value;
                 break;
             case 'type':
                 $this->type = $value;
                 break;
             case 'dbField':
                 $this->dbField = $value;
                 break;
         }
     }
 }
开发者ID:notzen,项目名称:ImpressPages-CMS,代码行数:33,代码来源:element_date_time.php

示例6: __construct

 /**
  * @param array $config Configuration options
  */
 public function __construct(array $config = [])
 {
     // Parent constructor
     parent::__construct($config);
     // Initialization
     $this->addClasses(['oo-ui-layout']);
 }
开发者ID:oojs,项目名称:oojs-ui,代码行数:10,代码来源:Layout.php

示例7: __construct

 public function __construct($name, $config)
 {
     $this->_config['noLabel'] = true;
     parent::__construct($name, $config);
     $this->_tag = 'button';
     $this->_defaultTemplateFile = 'slimform/partial/form/button.twig';
 }
开发者ID:fousheezy,项目名称:slim-form,代码行数:7,代码来源:Button.php

示例8: __construct

 public function __construct($id = '', $r, $cx, $cy)
 {
     parent::__construct($id);
     $this->r = $r;
     $this->cx = $cx;
     $this->cy = $cy;
 }
开发者ID:tarcisio,项目名称:svg,代码行数:7,代码来源:Circle.php

示例9: __construct

 /**
  * @param string|Element $label Defines the content of the element. If `$label` is not
  * a {@link Element} instance it is escaped.
  * @param string $href URI for linked resource.
  * @param array $attributes Optional attributes.
  */
 public function __construct($label, $href = '#', array $attributes = [])
 {
     if (!$label instanceof HTMLStringInterface) {
         $label = escape(t($label));
     }
     parent::__construct('a', $attributes + ['href' => $href, self::INNER_HTML => $label]);
 }
开发者ID:sylvaincombes,项目名称:Brickrouge,代码行数:13,代码来源:A.php

示例10: __construct

 public function __construct($name = null, $value = null, array $options = array())
 {
     parent::__construct($name, null, $options);
     if ($value !== null) {
         $this->data = $value;
     }
 }
开发者ID:ephigenia,项目名称:ephframe,代码行数:7,代码来源:Textarea.php

示例11: DB

 function __construct($request)
 {
     parent::__construct($request);
     $this->dispatchArray['post'][false]['insertUserIntoGroup'] = 'insertUserIntoGroup';
     $this->dispatchArray['post'][false]['insertGroup'] = 'insertGroup';
     $this->dispatchArray['post'][false]['addContact'] = 'addContact';
     //$this->dispatchArray['get'][false]['addContact'] = 'addContact';
     $this->dispatchArray['get'][false]['retrieveAllGroupsMembers'] = 'retrieveAllGroupsMembers';
     $this->dispatchArray['get'][false]['insertGroup'] = 'insertGroup';
     $this->dispatchArray['get'][false]['distanceFromContact'] = 'distanceFromContact';
     $this->dispatchArray['get'][true]['modifyGroup'] = 'modifyGroup';
     $this->dispatchArray['get'][true]['deleteContact'] = 'deleteContact';
     $this->dispatchArray['get'][true]['modifyContact'] = 'modifyContact';
     $this->dispatchArray['get'][true]['deleteGroup'] = 'deleteGroup';
     $this->dispatchArray['get'][false]['insertUserIntoGroup'] = 'insertUserIntoGroup';
     $this->dispatchArray['get'][true]['userToUser'] = 'userToUser';
     #HERE
     $this->dispatchArray['get'][false]['deleteMultipleGroups'] = 'deleteMultipleGroups';
     #HERE
     $this->dispatchArray['put'][true]['modifyGroup'] = 'modifyGroup';
     $this->dispatchArray['put'][true]['modifyContact'] = 'modifyContact';
     $this->dispatchArray['delete'][true]['deleteGroup'] = 'deleteGroup';
     $this->dispatchArray['delete'][true]['deleteContact'] = 'deleteContact';
     $this->dispatchArray['delete'][false]['deleteContactFromGroup'] = 'deleteContactFromGroup';
     #HERE
     $this->dispatchArray['post'][true][null] = 'methodNotImplemented';
     $this->dispatchArray['get'][false][null] = 'methodNotImplemented';
     $this->dispatchArray['put'][true][null] = 'methodNotImplemented';
     $this->dispatchArray['delete'][false][null] = 'methodNotImplemented';
     $this->dispatchArray['delete'][true][null] = 'methodNotImplemented';
     $this->nebulaDB = new DB();
 }
开发者ID:8Yards,项目名称:RESTServer,代码行数:32,代码来源:Groups.class.php

示例12: foreach

 function __construct($variables)
 {
     if (!isset($variables['order'])) {
         $variables['order'] = true;
     }
     parent::__construct($variables);
     if (!isset($variables['dbField']) || $variables['dbField'] == '') {
         $backtrace = debug_backtrace();
         if (isset($backtrace[0]['file']) && $backtrace[0]['line']) {
             trigger_error('ElementBool dbField parameter not set. (Error source: ' . $backtrace[0]['file'] . ' line: ' . $backtrace[0]['line'] . ' ) ');
         } else {
             trigger_error('ElementBool dbField parameter not set.');
         }
         exit;
     }
     foreach ($variables as $name => $value) {
         switch ($name) {
             case 'dbField':
                 $this->dbField = $value;
                 break;
             case 'defaultValue':
                 if ($value) {
                     $this->defaultValue = 1;
                 } else {
                     $this->defaultValue = 0;
                 }
                 break;
         }
     }
 }
开发者ID:notzen,项目名称:ImpressPages-CMS,代码行数:30,代码来源:element_bool.php

示例13: __construct

 /**
  * @param string $label
  * @param array $attributes
  */
 public function __construct($label, array $attributes = [])
 {
     if (is_string($label)) {
         $label = escape(t($label, [], ['scope' => 'button']));
     }
     parent::__construct('div', $attributes + [self::INNER_HTML => $label]);
 }
开发者ID:brickrouge,项目名称:brickrouge,代码行数:11,代码来源:SplitButton.php

示例14: __construct

 public function __construct($name, $text, $type = 'submit', $id = null, $class = null)
 {
     parent::__construct($name, $id, $class);
     $this->_text = $text;
     $this->_type = $type;
     return $this;
 }
开发者ID:kranack,项目名称:frmwrk,代码行数:7,代码来源:Button.php

示例15: __construct

 public function __construct($attributes, $formName, $keepValues = false)
 {
     parent::__construct($attributes, $formName, $keepValues);
     // Setando os options do select através do banco de dados:
     $this->setOptions();
     $this->setPrefixAndSuffix();
 }
开发者ID:vernonlacerda,项目名称:MelyssaFramework,代码行数:7,代码来源:Select.php


注:本文中的Element::__construct方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。