Пример #1
0
 /**
  * Creates this parameter source
  *
  */
 public function __construct($ordinal, $name)
 {
     parent::__construct($ordinal, $name);
     $this->convert = newinstance('webservices.rest.RestDeserializer', array(), '{
     public function deserialize($in, $target) {
       throw new IllegalStateException("Unused");
     }
   }');
 }
Пример #2
0
 /**
  * Create enumeration
  *
  * @param   array   $values
  * @param   string  $translatePrefix
  * @param   string  $translatePostfix
  * @param   string  $translateTextDomain
  * @param   string  $separator
  * @param   bool    $translationEnabled
  * @param   string  $splitter
  */
 public function __construct(array $values = array(), $translatePrefix = null, $translatePostfix = null, $translateTextDomain = null, $separator = null, $translationEnabled = true, $splitter = null)
 {
     parent::__construct($values, $translatePrefix, $translatePostfix, $translateTextDomain, $translationEnabled);
     if (null !== $separator) {
         $this->setSeparator($separator);
     }
     if (null !== $splitter) {
         $this->setSplitter($splitter);
     }
 }
Пример #3
0
 function __construct($name, $enum = NULL, $default = NULL)
 {
     // MultiEnum needs to take care of its own defaults
     parent::__construct($name, $enum, null);
     // Validate and assign the default
     $this->default = null;
     if ($default) {
         $defaults = preg_split('/ *, */', trim($default));
         foreach ($defaults as $thisDefault) {
             if (!in_array($thisDefault, $this->enum)) {
                 user_error("Enum::__construct() The default value '{$thisDefault}' does not match " . "any item in the enumeration", E_USER_ERROR);
                 return;
             }
         }
         $this->default = implode(',', $defaults);
     }
 }
Пример #4
0
 /**
  * Create a new DBClassName field
  *
  * @param string $name Name of field
  * @param string|null $baseClass Optional base class to limit selections
  */
 public function __construct($name = null, $baseClass = null)
 {
     $this->setBaseClass($baseClass);
     parent::__construct($name);
 }
Пример #5
0
 /**
  * @param mixed $id
  * @param string $name
  */
 protected function __construct($id, $name)
 {
     $this->name = $name;
     parent::__construct($id);
 }
 public function __construct($name)
 {
     parent::__construct($name);
     $this->service = Injector::inst()->get('AtRestCryptoService');
 }
Пример #7
0
 /**
  * Constructor
  *
  * @param  int ordinal
  * @param  string name
  * @param  webservices.rest.RestSerializer serializer
  * @param  webservices.rest.RestDeserializer deserializer
  */
 public function __construct($ordinal, $name, $serializer, $deserializer)
 {
     parent::__construct($ordinal, $name);
     $this->serializer = $serializer;
     $this->deserializer = $deserializer;
 }
Пример #8
0
 /**
  * ScalarEnum constructor.
  * @param mixed $id
  * @param mixed $value
  */
 protected function __construct($id, $value)
 {
     $this->value = $value;
     parent::__construct($id);
 }
Пример #9
0
 /**
  * @param string|array
  */
 public function __construct($input = null)
 {
     parent::__construct(self::IDENT, $input);
 }
Пример #10
0
 /**
  * Constructor
  * 
  * @param int ordinal default 0
  * @param string name default ''
  * @param string op The query operator (see constants)
  */
 public function __construct($ordinal, $name, $op)
 {
     parent::__construct($ordinal, $name);
     $this->op = $op;
 }