Example #1
0
 /**
  * Class constructor
  *
  * @param string $generateAction  The action on which the value should be generated: 'insert', 'update' or NULL (both)
  * @param mixed  $properties      Array with field properties
  */
 function __construct($generateAction, $properties = array())
 {
     if (!isset($properties['datatype'])) {
         $properties['datatype'] = 'datetime';
     }
     parent::__construct($generateAction, $properties);
 }
Example #2
0
File: Auth.php Project: jasny/Q
 /**
  * Class constructor
  *
  * @param string $generateAction  The action on which the value should be generated: 'insert', 'update' or NULL (both)
  * @param mixed  $properties      Array with field properties
  */
 function __construct($generateAction, $properties = array())
 {
     if (!load_class('Q\\Auth')) {
         throw new DB_Exception("Unable to create an authenticator field: Q\\Auth is not available.");
     }
     if (!isset($properties['datatype'])) {
         $properties['datatype'] = 'lookupkey';
     }
     if (!isset($properties['source'])) {
         $properties['source'] = Authenticator::i()->userQuery;
     }
     parent::__construct($generateAction, $properties);
 }