Exemplo n.º 1
0
 /**
  * Constructor.
  *
  * @param Base $validator  Initial validator
  * @param integer         $count      The number of times to replicate the validator
  * @param array           $options    An array of options
  * @param array           $messages   An array of error messages
  *
  * @see Base
  */
 public function __construct(Base $validator, $count, $options = array(), $messages = array())
 {
     $fields = array();
     for ($i = 0; $i < $count; $i++) {
         $fields[$i] = clone $validator;
     }
     parent::__construct($fields, $options, $messages);
 }
Exemplo n.º 2
0
 function __construct($config)
 {
     parent::__construct($config);
     $max = isset($config['size']) ? $config['size'] : 100;
     $this->_schema = array("type" => "object", "description" => "Request a slice of the final data set.", "properties" => array("limit" => array("type" => "number", "description" => "The number of items to fetch.", "default" => 20, "minimum" => 1, "maximum" => $max), "offset" => array("type" => "number", "description" => "Start with this item. 0-based.", "default" => 0, "minimum" => 0), "pageNumber" => array("type" => "number", "description" => "The page", "default" => 1, "minimum" => 1), "pageSize" => array("description" => "The number of items to fetch per page.", "default" => $max, "minimum" => 1)));
 }
Exemplo n.º 3
0
 public function __constrtuct()
 {
     parent::__construct("sqlite:" . dirname(__FILE__) . "/test.db");
 }
 /**
  * __construct
  * 
  * Defaults rules that ought to be validated to be server side.
  * 
  * @access public
  * @param  string $path
  * @return void
  */
 public function __construct($path)
 {
     parent::__construct($path);
     $this->setMethod('getServerRules');
 }
Exemplo n.º 5
0
 public function __construct($table)
 {
     parent::__construct($table);
     $this->engine('INNODB');
     $this->charset("UTF8");
 }
Exemplo n.º 6
0
 public function __construct()
 {
     parent::__construct("sqlite:test-get.db");
     $this->register_resultset("TestTable");
 }
Exemplo n.º 7
0
 /**
  * Constructor.
  *
  * @param string          $field      The field name
  * @param Base $validator  The validator
  * @param array           $options    An array of options
  * @param array           $messages   An array of error messages
  *
  * @see Base
  */
 public function __construct($field, Base $validator, $options = array(), $messages = array())
 {
     $this->addOption('field', $field);
     $this->addOption('validator', $validator);
     parent::__construct(null, $options, $messages);
 }
 /**
  * Class constructor method
  *
  * @param string $name           Column name
  * @param string $type           Column data-type
  * @param int    $constraint     Column data-type constraint
  * @param bool   $unsigned       Whether or not column is unsigned
  * @param bool   $null           Whether or not column is nullable
  * @param string $default        Column default value
  * @param bool   $auto_increment Whether or not columns should auto-increment
  * @param string $comment        Column comment
  */
 public function __construct($name, $type, $constraint = 0, $unsigned = FALSE, $null = FALSE, $default = '', $auto_increment = FALSE, $comment = '')
 {
     parent::__construct();
     $this->_name = $name;
     $this->_type = $type;
     $this->_constraint = $constraint;
     $this->_unsigned = $unsigned;
     $this->_null = $null;
     $this->_default = $default;
     $this->_auto_increment = $auto_increment;
     $this->_comment = $comment;
     log_message('info', __CLASS__ . ' Class Initialized');
 }
Exemplo n.º 9
0
 /**
  * Constructor.
  *
  * @param sfWidgetFormSchema $widget     A sfWidgetFormSchema instance
  * @param string             $decorator  A decorator string
  *
  * @see sfWidgetFormSchema
  */
 public function __construct(Schema $widget, $decorator)
 {
     $this->widget = $widget;
     $this->decorator = $decorator;
     parent::__construct();
 }
Exemplo n.º 10
0
 /**
  * Constructor.
  *
  * @param sfWidgetFormSchema $widget      An sfWidgetFormSchema instance
  * @param integer            $count       The number of times to duplicate the widget
  * @param array              $options     An array of options
  * @param array              $attributes  An array of default HTML attributes
  * @param array              $labels      An array of HTML labels
  *
  * @see sfWidgetFormSchema
  */
 public function __construct(Schema $widget, $count, $options = array(), $attributes = array(), $labels = array())
 {
     parent::__construct(array_fill(0, $count, $widget), $options, $attributes, $labels);
 }