Пример #1
0
 /**
  * Data constructor
  * 
  * @param int $id Optional - if set gets data from PID = $id
  * @param string $class Option - if set then sets className directly
  */
 public function __construct($id = NULL, $class = NULL)
 {
     if ($class) {
         $this->setClassName($class);
     }
     parent::__construct($id);
 }
 public function __construct($table_name, $columns, $id = null)
 {
     if (!is_array(ORMObject::$_data)) {
         ORMObject::$_data = array();
     }
     parent::__construct($table_name, $columns, $id);
 }
Пример #3
0
 /**
  * Constructor
  * @param {string} Name for this object
  * @param {integer} $manga Manga ID
  * @throws Exception when
  * - cannot contact database
  * - invalid manga ID
  */
 function __construct($file, $manga)
 {
     parent::__construct($file);
     if ($manga <= 0) {
         $this->errormsg = "Resultados::Construct invalid Manga ID: {$manga}";
         throw new Exception($this->errormsg);
     }
     $this->manga = $this->__getArray("Mangas", $manga);
     if (!is_array($this->manga)) {
         $this->errormsg = "OrdenSalida::construct(): Cannot get info on manga:{$manga}";
         throw new Exception($this->errormsg);
     }
     $this->jornada = $this->__getArray("Jornadas", $this->manga['Jornada']);
     if (!is_array($this->jornada)) {
         $this->errormsg = "OrdenSalida::construct(): Cannot get jornada info on jornada:{$this->manga['Jornada']} manga:{$manga}";
         throw new Exception($this->errormsg);
     }
     $this->prueba = $this->__getArray("Pruebas", $this->jornada['Prueba']);
     if (!is_array($this->prueba)) {
         $this->errormsg = "OrdenSalida::construct(): Cannot get prueba info on prueba:{$this->jornada['Prueba']} jornada:{$this->manga['Jornada']} manga:{$manga}";
         throw new Exception($this->errormsg);
     }
     $this->federation = Federations::getFederation(intval($this->prueba['RSCE']));
     if ($this->federation == null) {
         $this->errormsg = "OrdenSalida::construct(): Cannot get federation info on prueba:{$this->jornada['Prueba']} jornada:{$this->manga['Jornada']} manga:{$manga}";
         throw new Exception($this->errormsg);
     }
 }
Пример #4
0
 public function __construct($id = false)
 {
     if (empty($id)) {
         $this->Created = time();
         $this->Modified = time();
     }
     parent::__construct($id);
 }
 public function __construct($id = '')
 {
     parent::__construct('tags', array('name'), '');
     $this->select($id, 'name');
     if ($this->id == '') {
         $this->name = $id;
         $this->insert();
     }
 }
Пример #6
0
 public function __construct($init = null, $key = 0)
 {
     parent::__construct();
     $this->_objType = 'categories_category';
     $this->_objPath = 'category';
     $this->_objPermissionFilter[] = array('component_left' => 'ZikulaCategoriesModule', 'component_middle' => '', 'component_right' => '', 'instance_left' => 'id', 'instance_middle' => 'ipath', 'instance_right' => 'path', 'level' => ACCESS_READ);
     $this->_objValidation['name'] = array('name', true, 'noop', '', __('Error! You did not enter a name.'), '');
     $this->_init($init, $key);
 }
Пример #7
0
 function __construct($init = null, $key = 0, $field = null)
 {
     parent::__construct();
     $this->_objType = 'sc_intrusion';
     $this->_objField = 'id';
     $this->_objPath = 'intrusion';
     $this->_objJoin[] = array('join_table' => 'users', 'join_field' => 'uname', 'object_field_name' => 'username', 'compare_field_table' => 'uid', 'compare_field_join' => 'uid');
     $this->_init($init, $key);
 }
Пример #8
0
 function __construct($meta = array(), array $options = array())
 {
     if (!is_array($meta) && is_numeric($meta)) {
         $meta = array('id' => $meta);
     }
     $meta['table'] = 'persist_users';
     $meta['name'] = 'PersistUser';
     $meta['fields'] = array('id' => 'primarykey', 'user_id' => 'integer', 'random' => 'integer', 'added' => 'dateadded');
     return parent::__construct($meta, $options);
 }
Пример #9
0
 function __construct($meta = array(), array $options = array())
 {
     if (!is_array($meta) && is_numeric($meta)) {
         $meta = array('id' => $meta);
     }
     $meta['table'] = 'components';
     $meta['name'] = 'Component';
     $meta['fields'] = array('id' => 'primarykey', 'name' => 'string', 'filename' => array('type' => 'string', 'string_size' => 1024), 'options' => 'text', 'active' => 'boolean', 'modified' => 'lastmodified', 'added' => 'dateadded');
     return parent::__construct($meta, $options);
 }
Пример #10
0
 function __construct($meta = array(), array $options = array())
 {
     $fields = $meta['fields'];
     $fields['mime_type'] = array_key_exists('mime_type', $fields) ? $fields['mime_type'] : 'string';
     $fields['from_db'] = array_key_exists('from_db', $fields) ? $fields['from_db'] : 'boolean';
     $fields['content'] = array_key_exists('content', $fields) ? $fields['content'] : 'long_blob';
     $fields['meta_info'] = array_key_exists('meta_info', $fields) ? $fields['meta_info'] : 'serialized';
     $meta['fields'] = $fields;
     return parent::__construct($meta, $options);
 }
Пример #11
0
 function __construct($meta = array(), array $options = array())
 {
     if (!is_array($meta) && is_numeric($meta)) {
         $meta = array('id' => $meta);
     }
     $meta['table'] = 'b_e_filters';
     $meta['name'] = 'BEFilter';
     $meta['fields'] = array('id' => 'primarykey', 'name' => 'string', 'description' => 'text', 'class' => 'string', 'function' => 'string', 'options' => 'string', 'active' => 'boolean', 'modified' => 'lastmodified', 'added' => 'dateadded');
     return parent::__construct($meta, $options);
 }
Пример #12
0
 function __construct($meta = array(), array $options = array())
 {
     if (!is_array($meta) && is_numeric($meta)) {
         $meta = array('id' => $meta);
     }
     $meta['table'] = 'themes';
     $meta['name'] = 'Theme';
     $meta['fields'] = array('id' => 'primarykey', 'name' => 'string', 'description' => 'text', 'screenshot' => 'string (default)', 'path' => 'string', 'active' => 'boolean', 'modified' => 'lastmodified', 'added' => 'dateadded');
     return parent::__construct($meta, $options);
 }
Пример #13
0
 function __construct($meta = array(), array $options = array())
 {
     if (!is_array($meta) && is_numeric($meta)) {
         $meta = array('id' => $meta);
     }
     $meta['table'] = 'assignments';
     $meta['name'] = 'Assignment';
     $meta['fields'] = array('id' => 'primarykey', 'access_type' => 'string', 'access_id' => 'integer', 'role_id' => 'integer', 'active' => 'boolean', 'modified' => 'lastmodified', 'added' => 'dateadded');
     return parent::__construct($meta, $options);
 }
Пример #14
0
 /**
  * Constructor
  * @param {string} $file caller for this object
  * @param {integer} $prueba Prueba ID for these jornadas
  * @throws Exception if cannot contact database
  */
 function __construct($file, $prueba)
 {
     parent::__construct($file);
     if ($prueba < 0) {
         $this->errormsg = "{$file}::construct() invalid prueba ID";
         throw new Exception($this->errormsg);
     }
     $this->prueba = $prueba;
     $this->jueces = array("1" => "-- Sin asignar --");
 }
Пример #15
0
 function __construct($meta = array(), array $options = array())
 {
     if (!is_array($meta) && is_numeric($meta)) {
         $meta = array('id' => $meta);
     }
     $meta['table'] = 'backend_files';
     $meta['name'] = 'BackendFile';
     $meta['fields'] = array('id' => 'primarykey', 'name' => array('type' => 'string', 'string_size' => 255), 'file' => array('type' => 'string', 'string_size' => 1024), 'version' => array('type' => 'string', 'string_size' => 10), 'dependencies' => 'text', 'active' => 'boolean', 'modified' => 'lastmodified', 'added' => 'dateadded');
     return parent::__construct($meta, $options);
 }
Пример #16
0
 function __construct($meta = array(), array $options = array())
 {
     if (!is_array($meta) && is_numeric($meta)) {
         $meta = array('id' => $meta);
     }
     $meta['table'] = 'backend_errors';
     $meta['name'] = 'BackendErrors';
     $meta['fields'] = array('id' => 'primarykey', 'user_id' => 'current_user', 'mode' => array('type' => 'string', 'string_size' => 255), 'request' => 'current_request', 'query' => 'current_query', 'number' => 'number', 'string' => 'large_string', 'file' => 'string', 'line' => 'number', 'context' => 'string', 'stacktrace' => 'text', 'added' => 'lastmodified');
     return parent::__construct($meta, $options);
 }
Пример #17
0
 /**
  * Constructor
  * @param {string} $file caller for this object
  * @param {integer} $jornada jornada ID
  * @throws Exception if cannot contact database or invalid jornada ID
  */
 function __construct($file, $jornada)
 {
     parent::__construct($file);
     if ($jornada <= 0) {
         $this->errormsg = "Manga::Construct invalid jornada ID";
         throw new Exception($this->errormsg);
     }
     $this->jornada = $jornada;
     $this->pruebaObj = $this->__selectObject("Pruebas.ID,Pruebas.RSCE,Pruebas.Selectiva", "Pruebas,Jornadas", "(Pruebas.ID=Jornadas.Prueba) AND (Jornadas.ID={$jornada})");
 }
Пример #18
0
 function __construct($meta = array(), array $options = array())
 {
     if (!is_array($meta) && is_numeric($meta)) {
         $meta = array('id' => $meta);
     }
     $meta['table'] = 'twitter';
     $meta['name'] = 'Twitter';
     $meta['fields'] = array('id' => 'primarykey', 'user_id' => 'current_user', 'twitter_id' => 'large_integer', 'screen_name' => 'string', 'oauth_token' => 'string', 'oauth_secret' => 'string', 'active' => 'boolean', 'modified' => 'lastmodified', 'added' => 'dateadded');
     return parent::__construct($meta, $options);
 }
Пример #19
0
 function __construct($meta = array(), array $options = array())
 {
     if (!is_array($meta) && is_numeric($meta)) {
         $meta = array('id' => $meta);
     }
     $meta['table'] = 'backend_requests';
     $meta['name'] = 'BackendRequest';
     $meta['fields'] = array('id' => 'primarykey', 'user_id' => 'current_user', 'ip' => 'ip_address', 'user_agent' => 'user_agent', 'mode' => array('type' => 'string', 'string_size' => 255), 'request' => 'current_request', 'query' => 'current_query', 'added' => 'lastmodified');
     return parent::__construct($meta, $options);
 }
Пример #20
0
 function __construct($meta = array(), array $options = array())
 {
     if (!is_array($meta) && is_numeric($meta)) {
         $meta = array('id' => $meta);
     }
     $meta['table'] = 'backend_queries';
     $meta['name'] = 'BackendQuery';
     $meta['fields'] = array('id' => 'primarykey', 'alias' => array('type' => 'string', 'string_size' => 255), 'query' => array('type' => 'string', 'string_size' => 1024), 'active' => 'boolean', 'modified' => 'lastmodified', 'added' => 'dateadded');
     $meta['keys'] = array('alias' => 'unique');
     return parent::__construct($meta, $options);
 }
Пример #21
0
 /**
  * Constructor
  * @param {string} $file caller for this object
  * @param {integer} $prueba Prueba ID
  * @throws Exception if cannot contact database or invalid prueba/jornada ID
  */
 function __construct($file, $prueba)
 {
     parent::__construct($file);
     if ($prueba <= 0) {
         $this->errormsg = "{$file}::construct() invalid prueba:{$prueba} ID";
         throw new Exception($this->errormsg);
     }
     $this->pruebaID = $prueba;
     $this->insertid = 0;
     // initial value
 }
Пример #22
0
 function __construct($meta = array(), array $options = array())
 {
     if (!is_array($meta) && is_numeric($meta)) {
         $meta = array('id' => $meta);
     }
     $meta['table'] = 'hooks';
     $meta['name'] = 'Hook';
     $meta['fields'] = array('id' => 'primarykey', 'name' => 'title', 'description' => 'text', 'mode' => 'string', 'type' => 'medium_string', 'hook' => 'medium_string', 'class' => 'medium_string', 'method' => 'string', 'sequence' => 'integer', 'global' => 'boolean', 'active' => 'boolean', 'modified' => 'lastmodified', 'added' => 'dateadded');
     $meta['keys'] = array('type,hook,class' => 'unique');
     return parent::__construct($meta, $options);
 }
Пример #23
0
 function __construct($meta = array(), array $options = array())
 {
     if (!is_array($meta) && is_numeric($meta)) {
         $meta = array('id' => $meta);
     }
     $meta['table'] = 'backend_search';
     $meta['name'] = 'BackendSearch';
     $meta['fields'] = array('id' => 'primarykey', 'table' => array('type' => 'string', 'string_size' => 124), 'table_id' => 'number', 'word' => array('type' => 'string', 'string_size' => 124), 'count' => 'number', 'sequence' => 'number', 'added' => 'lastmodified');
     $meta['keys'] = array('table,table_id,word' => 'unique');
     return parent::__construct($meta, $options);
 }
Пример #24
0
 function __construct($meta = array(), array $options = array())
 {
     if (!is_array($meta) && is_numeric($meta)) {
         $meta = array('id' => $meta);
     }
     $meta['table'] = 'outgoing_clicks';
     $meta['name'] = 'OutgoingClick';
     $meta['fields'] = array('id' => array('field' => 'id', 'type' => 'primarykey', 'null' => false, 'default' => NULL), 'user_id' => array('field' => 'user_id', 'type' => 'current_user', 'null' => false, 'default' => NULL), 'destination' => array('field' => 'destination', 'type' => 'string', 'null' => false, 'default' => NULL, 'string_size' => 1024), 'origin' => array('field' => 'origin', 'type' => 'previous_query', 'null' => false, 'default' => NULL), 'ip' => array('field' => 'ip', 'type' => 'ip_address', 'null' => false, 'default' => NULL), 'added' => array('field' => 'added', 'type' => 'lastmodified', 'null' => false));
     $meta['keys'] = array();
     return parent::__construct($meta, $options);
 }
Пример #25
0
 public function __construct($init = null, $key = 0)
 {
     parent::__construct();
     $this->_objType = 'categories_registry';
     $this->_objPath = 'category_registry';
     $this->_objValidation['modname'] = array('modname', true, 'noop', '', __('Error! You did not select a module.'));
     $this->_objValidation['table'] = array('table', true, 'noop', '', __('Error! You did not select a module table.'));
     $this->_objValidation['property'] = array('property', true, 'noop', '', __('Error! You did not enter a property name.'));
     $this->_objValidation['category_id'] = array('category_id', true, 'noop', '', __('Error! You did not select a category.'));
     $this->_init($init, $key);
 }
Пример #26
0
 function __construct($meta = array(), array $options = array())
 {
     if (!is_array($meta) && is_numeric($meta)) {
         $meta = array('id' => $meta);
     }
     $meta['table'] = 'values';
     $meta['name'] = 'Value';
     $meta['fields'] = array('id' => 'primarykey', 'name' => 'string', 'value' => 'serialized', 'modified' => 'lastmodified');
     $meta['keys'] = array('name' => 'unique');
     return parent::__construct($meta, $options);
 }
Пример #27
0
 function __construct($meta = array(), array $options = array())
 {
     if (!is_array($meta) && is_numeric($meta)) {
         $meta = array('id' => $meta);
     }
     $meta['table'] = 'roles';
     $meta['name'] = 'Role';
     $meta['fields'] = array('id' => 'primarykey', 'name' => 'title', 'description' => 'text', 'active' => 'boolean', 'modified' => 'lastmodified', 'added' => 'dateadded');
     $meta['keys'] = array('table' => array('type' => 'unique', 'fields' => array('name')));
     return parent::__construct($meta, $options);
 }
Пример #28
0
 function __construct($meta = array(), array $options = array())
 {
     require_once BACKEND_FOLDER . '/libraries/Markdown/markdown.php';
     if (!is_array($meta) && (is_numeric($meta) || is_string($meta))) {
         $meta = array('id' => $meta);
     }
     $meta['table'] = 'content_revisions';
     $meta['name'] = 'Content Revision';
     $meta['fields'] = array('id' => 'primarykey', 'user_id' => 'integer', 'content_id' => 'integer', 'summary' => 'title', 'markdown' => 'text', 'body' => 'text', 'active' => 'boolean', 'modified' => 'lastmodified', 'added' => 'dateadded');
     return parent::__construct($meta, $options);
 }
Пример #29
0
 function __construct($meta = array(), array $options = array())
 {
     if (!is_array($meta) && is_numeric($meta)) {
         $meta = array('id' => $meta);
     }
     $meta['table'] = 'permissions';
     $meta['name'] = 'Permission';
     $meta['fields'] = array('id' => 'primarykey', 'role' => array('type' => 'string', 'string_size' => 60), 'control' => 'integer', 'action' => array('type' => 'string', 'string_size' => 60), 'subject' => array('type' => 'string', 'string_size' => 60), 'subject_id' => 'integer', 'system' => 'integer', 'active' => 'boolean', 'modified' => 'lastmodified', 'added' => 'dateadded');
     $meta['keys'] = array('role,action,subject,subject_id' => 'unique', 'subject,action,subject_id' => 'index');
     return parent::__construct($meta, $options);
 }
Пример #30
0
 function __construct($meta = array(), array $options = array())
 {
     if (!is_array($meta) && is_numeric($meta)) {
         $meta = array('id' => $meta);
     }
     $meta['database'] = 'bi_api';
     $meta['table'] = 'backend_locks';
     $meta['name'] = 'BackendLock';
     $meta['fields'] = array('id' => array('field' => 'id', 'type' => 'primarykey', 'null' => false, 'default' => NULL), 'name' => array('field' => 'name', 'type' => 'string', 'null' => false, 'default' => NULL, 'string_size' => 255), 'type' => array('field' => 'type', 'type' => 'number', 'null' => false, 'default' => NULL), 'expire' => array('field' => 'expire', 'type' => 'datetime', 'null' => true, 'default' => NULL), 'locked' => array('field' => 'locked', 'type' => 'boolean', 'null' => false, 'default' => NULL), 'modified' => array('field' => 'modified', 'type' => 'lastmodified', 'null' => false), 'added' => array('field' => 'added', 'type' => 'dateadded', 'null' => false, 'default' => NULL));
     $meta['keys'] = array('name' => array('type' => 'unique', 'fields' => array('name')));
     return parent::__construct($meta, $options);
 }