Example #1
0
 /**
  * Create instance
  *
  * @param string $name The name of the field
  * @param array  $data The data to construct the field
  */
 public function __construct($name, array $data)
 {
     parent::__construct($name, $data);
     if (array_key_exists('label', $data)) {
         $this->label = $data['label'];
     }
     $this->type = 'checkbox';
 }
Example #2
0
 /**
  * Create instance
  *
  * @param string $name The name of the field
  * @param array  $data The data to construct the field
  */
 public function __construct($name, array $data)
 {
     parent::__construct($name, $data);
     if (array_key_exists('placeholder', $data)) {
         $this->placeholder = $data['placeholder'];
     }
     $this->type = 'text';
 }
Example #3
0
 /**
  * Create instance
  *
  * @param string $name The name of the field
  * @param array  $data The data to construct the field
  */
 public function __construct($name, array $data)
 {
     parent::__construct($name, $data);
     $this->type = 'multi-select-bucket';
     if (array_key_exists('options', $data)) {
         $this->options = $data['options'];
     }
 }
Example #4
0
 function __construct($subclass_attributes = array())
 {
     $attributes = array("action" => "", "entityname" => "", "modulename" => "", "modifier" => "", "id" => "", "successurl" => "", "failureurl" => "");
     # merge the attibutes of the parent and the subclass
     $newattributes = array_merge($attributes, $subclass_attributes);
     # load the attributes by calling the parent constructor. This is to prevent changing
     # attributes at run time
     parent::__construct($newattributes);
 }
Example #5
0
 function __construct($newattributes = array())
 {
     if (!function_exists('get_instance')) {
         return "Can't get CI instance";
     }
     $this->CI =& get_instance();
     # load the attributes by calling the parent constructor. This is to prevent changing
     # attributes at run time
     parent::__construct($newattributes);
     # the database connection object
     $this->CI->load->library('kernel/database');
     $this->db = $this->CI->database;
 }
Example #6
0
 /**
  * @param string $Name
  * @param string $Default
  * @param integer $MaximumLength
  */
 public function __construct($name, $default = null, $maximumLength = null){
     parent::__construct($name, $default);
     $this->maximumLength = (\is_null($maximumLength)) ? null : (int)$maximumLength;
 }
Example #7
0
	/**
	 * @param string $Name
	 * @param integer $Default
	 * @param integer $Minimum
	 * @param integer $Maximum
	 */
	public function __construct($name, $default = null, $minimum = null, $maximum = null){
		parent::__construct($name, $default);
		$this->minimum = (\is_null($minimum))? null : (int)$minimum;
		$this->maximum = (\is_null($maximum))? null : (int)$maximum;
	}
Example #8
0
 /**
  * @param type $name
  * @param type $type
  * @param type $default 
  */
 public function __construct($name, $type = \MongoBinData::BYTE_ARRAY, $default = null)
 {
     $this->type = $type;
     parent::__construct($name, $default);
 }
Example #9
0
	/**
	 * @param string $name
	 * @param boolean $default
	 */
	public function __construct($name, $default = null){
		if (!\is_null($default)) {
			$default = (boolean)$default;
		}
		parent::__construct($name, $default);
	}
 /**
  * creates a connector with given credentials
  *
  * @param string $email
  * @param string $password
  * @param string $answer
  * @param string $platform
  */
 public function __construct($email, $password, $answer, $platform, $security_code)
 {
     parent::__construct($email, $password, $answer, $platform, $security_code);
 }
Example #11
0
 /**
  * {@inheritDoc}
  */
 public function __construct($model)
 {
     parent::__construct($model);
     $this->markUnknown();
 }
Example #12
0
 /**
  * Open a directory.
  *
  * @access  public
  * @param   string  $streamName    Stream name.
  * @param   string  $mode          Open mode, see the self::MODE* constants.
  * @param   string  $context       Context ID (please, see the
  *                                 \Hoa\Stream\Context class).
  * @param   bool    $wait          Differ opening or not.
  * @return  void
  */
 public function __construct($streamName, $mode = self::MODE_READ, $context = null, $wait = false)
 {
     $this->setMode($mode);
     parent::__construct($streamName, $context, $wait);
     return;
 }
Example #13
0
 /**
  *
  * @param string $name
  * @param string $type the classname this property should hold
  * @param $default
  * @return Morph_Property_hasOne
  */
 public function __construct($name, $type, \morph\Object $default = null)
 {
     $this->type = $type;
     $this->isPermissableType($default);
     parent::__construct($name, $default);
 }
 public function __construct()
 {
     parent::__construct("user");
 }
Example #15
0
	/**
	 * @param string $name
	 */
	public function __construct($name)
	{
		parent::__construct($name, null);
	}
 public function __construct(\PHPUnit_Extensions_Database_DB_IDatabaseConnection $connection, $fixturePath)
 {
     parent::__construct($connection, $fixturePath);
     $this->setUpOperation = \PHPUnit_Extensions_Database_Operation_Factory::CLEAN_INSERT(true);
 }
Example #17
0
 public function __construct($code = 200, $message = null, $data = null, \Exception $previous_exception = null)
 {
     parent::__construct('HTTPCODE', $message, $data, $previous_exception);
     $this->code = $code;
 }
 public function __construct()
 {
     parent::__construct("passwords");
 }
Example #19
0
 /**
  * Constructor
  * 
  * @param string $msg Exception message
  */
 public function __construct($msg = "The regex is empty")
 {
     parent::__construct($msg);
 }
Example #20
0
 public function __construct($code, \Exception $previous_exception = null)
 {
     parent::__construct($code, $code, null, $previous_exception);
 }
Example #21
0
 public function __construct($id, $meta = 0, $name = "Unknown")
 {
     parent::__construct($id, $meta, $name);
     $this->isSolid = true;
     $this->isFullBlock = true;
 }
Example #22
0
File: File.php Project: Hywan/File
 /**
  * Open a file.
  *
  * @access  public
  * @param   string  $streamName    Stream name (or file descriptor).
  * @param   string  $mode          Open mode, see the self::MODE_*
  *                                 constants.
  * @param   string  $context       Context ID (please, see the
  *                                 \Hoa\Stream\Context class).
  * @param   bool    $wait          Differ opening or not.
  * @return  void
  * @throw   \Hoa\File\Exception
  */
 public function __construct($streamName, $mode, $context = null, $wait = false)
 {
     $this->setMode($mode);
     switch ($streamName) {
         case '0':
             $streamName = 'php://stdin';
             break;
         case '1':
             $streamName = 'php://stdout';
             break;
         case '2':
             $streamName = 'php://stderr';
             break;
         default:
             if (true === ctype_digit($streamName)) {
                 if (PHP_VERSION_ID >= 50306) {
                     $streamName = 'php://fd/' . $streamName;
                 } else {
                     throw new Exception('You need PHP5.3.6 to use a file descriptor ' . 'other than 0, 1 or 2 (tried %d with PHP%s).', 0, array($streamName, PHP_VERSION));
                 }
             }
     }
     parent::__construct($streamName, $context, $wait);
     return;
 }
Example #23
0
 /**
  * Creates a property to contain a reference to another Morph_Object
  *
  * @param string $name The name to associate with this property
  * @param string $type The class that this property should contain
  * @return Morph_Object
  */
 public function __construct($name, $type)
 {
     $this->type = $type;
     parent::__construct($name);
 }
Example #24
0
 /**
  * Create instance
  *
  * @param string $name The name of the field
  * @param array  $data The data to construct the field
  */
 public function __construct($name, array $data)
 {
     parent::__construct($name, $data);
     $this->type = 'hidden';
 }
 /**
  * creates a connector with given credentials
  *
  * @param string $email
  * @param string $password
  * @param string $answer
  * @param string $platform
  */
 public function __construct($email, $password, $answer, $platform)
 {
     parent::__construct($email, $password, $answer, $platform);
 }
Example #26
0
 /**
  * Creates instance
  *
  * @param string                                  $name            The name of the field
  * @param \CodeCollab\Form\Validation\Validator[] $validationRules The validation rules
  * @param string                                  $defaultValue    The default value
  */
 public function __construct(string $name, array $validationRules = [], $defaultValue = null)
 {
     parent::__construct($name, 'csrf', $validationRules, $defaultValue);
 }
Example #27
0
 /**
  * @param string $name
  * @param array $enums An array of valid enum values
  * @param mixed $default
  */
 public function __construct($name, array $choices, $default = null)
 {
     $this->choices = $choices;
     parent::__construct($name, $default);
 }