__construct() public method

public __construct ( $line, Compiler $compiler )
$compiler Compiler
Example #1
0
 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;
 }
 function __construct($name = "", $note = "", $element = null, $parse = Element::PARSE_MODE_JAVA)
 {
     parent::__construct($parse);
     $this->name = $name;
     $this->note = $note;
     $this->element = $element;
 }
Example #3
0
 public function __construct()
 {
     parent::__construct();
     // load widgetkit
     require_once JPATH_ADMINISTRATOR . '/components/com_widgetkit/widgetkit.php';
     $this->widgetkit = Widgetkit::getInstance();
 }
Example #4
0
 /**
  * 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');
 }
 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;
         }
     }
 }
Example #6
0
 /**
  * @param array $config Configuration options
  */
 public function __construct(array $config = [])
 {
     // Parent constructor
     parent::__construct($config);
     // Initialization
     $this->addClasses(['oo-ui-layout']);
 }
Example #7
0
 public function __construct($name, $config)
 {
     $this->_config['noLabel'] = true;
     parent::__construct($name, $config);
     $this->_tag = 'button';
     $this->_defaultTemplateFile = 'slimform/partial/form/button.twig';
 }
Example #8
0
 public function __construct($id = '', $r, $cx, $cy)
 {
     parent::__construct($id);
     $this->r = $r;
     $this->cx = $cx;
     $this->cy = $cy;
 }
Example #9
0
 /**
  * @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]);
 }
Example #10
0
 public function __construct($name = null, $value = null, array $options = array())
 {
     parent::__construct($name, null, $options);
     if ($value !== null) {
         $this->data = $value;
     }
 }
Example #11
0
 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'] = '******';
     #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();
 }
Example #12
0
 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;
         }
     }
 }
Example #13
0
 /**
  * @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]);
 }
Example #14
0
 public function __construct($name, $text, $type = 'submit', $id = null, $class = null)
 {
     parent::__construct($name, $id, $class);
     $this->_text = $text;
     $this->_type = $type;
     return $this;
 }
Example #15
0
 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();
 }
Example #16
0
File: page.php Project: stgnet/pui
 public function __construct($title = 'Web Page', $kwargs = array())
 {
     //pui.element.__init__(self, 'page', **kwargs)
     parent::__construct(False, $kwargs);
     $this->title = $title;
     $this->head[] = new Element('meta', array('charset' => 'utf-8'));
 }
Example #17
0
 public function __construct($name, $attributes = array())
 {
     parent::__construct();
     $attributes['name'] = !array_key_exists('name', $attributes) ? $name : $attributes['name'];
     $attributes['id'] = !array_key_exists('id', $attributes) ? $name : $attributes['id'];
     $this->attributes = array_merge($this->attributes, $attributes);
 }
Example #18
0
 public function __construct()
 {
     // call parent constructor
     parent::__construct();
     // set callbacks
     $this->registerCallback('dirs');
 }
Example #19
0
 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('ElementFile dbField parameter not set. (Error source: ' . $backtrace[0]['file'] . ' line: ' . $backtrace[0]['line'] . ' ) ');
         } else {
             trigger_error('ElementFile dbField parameter not set.');
         }
         exit;
     }
     $this->tmpFiles = array();
     $this->extensions = array();
     $this->destDir = FILE_DIR;
     foreach ($variables as $name => $value) {
         switch ($name) {
             case 'extensions':
                 $this->extensions = $value;
                 break;
             case 'destDir':
                 $this->destDir = $value;
                 break;
             case 'dbField':
                 $this->dbField = $value;
                 break;
         }
     }
 }
Example #20
0
 /**
  * Construct new element
  * @internal
  * @param string $id
  * @param string $name
  * @param integer $type
  * @param string $label
  * @param string $value
  * @param boolean $checked
  * @param array $meta
  */
 public function __construct($id, $name, $type, $label, $value, $checked = false, $meta = array())
 {
     parent::__construct($name, $type, $label, array(), array(), $meta);
     $this->__id = $id;
     $this->__value = $value;
     $this->__checked = $checked;
 }
Example #21
0
 /**
  * Constructor for the checkbox.
  *
  * @param $label The label of the checkbox.
  * @param $name The name of the checkbox used for the name='' attribute of the HTML output
  * @param $description A description of the field.
  * @param $value A value to assign to this checkbox.
  */
 public function __construct($label = "", $name = "", $description = "", $value = "", $uncheckedValue = "0")
 {
     Element::__construct($label, $description);
     parent::__construct($name);
     $this->setCheckedValue($value);
     $this->setUncheckedValue($uncheckedValue);
 }
Example #22
0
 public function __construct($name = null, $owner = null, $value = null)
 {
     parent::__construct($name, $owner);
     $this->tag = "input";
     $this->doubleTag = Cons::NO;
     $this->value = $value;
 }
Example #23
0
 /**
  * @param $source string
  */
 public function __construct($source = null)
 {
     parent::__construct('img');
     if (isset($source)) {
         $this->setAttribute('src', $source);
     }
 }
 function __construct($variables)
 {
     parent::__construct($variables);
     if (!isset($variables['dbField']) || $variables['dbField'] == '') {
         $backtrace = debug_backtrace();
         if (isset($backtrace[0]['file']) && $backtrace[0]['line']) {
             trigger_error('ElementTextarea dbField parameter not set. (Error source: ' . $backtrace[0]['file'] . ' line: ' . $backtrace[0]['line'] . ' ) ');
         } else {
             trigger_error('ElementTextarea dbField parameter not set.');
         }
         exit;
     }
     foreach ($variables as $name => $value) {
         switch ($name) {
             case 'regExpression':
                 $this->regExpression = $value;
                 break;
             case 'regExpressionError':
                 $this->regExpressionError = $value;
                 break;
             case 'maxLength':
                 $this->maxLength = $value;
                 break;
             case 'dbField':
                 $this->dbField = $value;
                 break;
         }
     }
 }
Example #25
0
 /**
  * Constructor
  * 
  * @param HTMLDisplayInterface$fieldDisplayElement
  * @param string $labelText
  */
 public function __construct($labelText = null)
 {
     parent::__construct('label');
     if (!is_null($labelText)) {
         $this->setContent($labelText);
     }
 }
Example #26
0
File: File.php Project: renq/ML-Lib
	public function __construct($label = false, $validators = array()) {
		parent::__construct($label, $validators);
		//$form=$this->getForm();
		//$form->enctype='multipart/form-data';
		//$this->setForm($form);
		//$this->form->enctype='multipart/form-data';
	}
Example #27
0
 public function __construct(array $attributes = array())
 {
     parent::__construct('TABLE', $attributes);
     $this->ignoreAttribute('THEME');
     if ($this->hasAttribute('THEME')) {
         $this->addClass('table');
         $styles = explode(' ', $this->getAttribute('THEME'));
         foreach ($styles as $style) {
             switch ($style) {
                 case 'striped':
                     $this->addClass('table-striped');
                     break;
                 case 'bordered':
                     $this->addClass('table-bordered');
                     break;
                 case 'hover':
                     $this->addClass('table-hover');
                     break;
                 case 'condensed':
                     $this->addClass('table-condensed');
                     break;
             }
         }
     }
 }
Example #28
0
 public function __construct($label = "", $name = "", $description = "", $value = "")
 {
     Field::__construct($name, $value);
     Element::__construct($label, $description);
     $this->type = "TEXT";
     $this->addAttribute("type", "text");
 }
Example #29
0
 /**
  * Constructor
  *
  * @param string  $name  The proposition name
  * @param boolean $value Proposition value
  */
 public function __construct($name, $value = null)
 {
     parent::__construct($name);
     if (null !== $value) {
         $this->setValue($value);
     }
 }
Example #30
0
 /**
  * Constructor
  * 
  * @param string $legend
  */
 public function __construct($legend = null)
 {
     parent::__construct('fieldset');
     if (!is_null($legend)) {
         $this->appendChild((new Element('legend'))->setContent($legend));
     }
 }