예제 #1
0
 public function __construct()
 {
     $this->mysqli =& $GLOBALS['mysqli_connection'];
     if ($GLOBALS['ENV_NAME'] == 'production' && environment_defined('slave')) {
         $this->mysqli_slave = load_mysql_environment('slave');
     } else {
         $this->mysqli_slave =& $this->mysqli;
     }
     $this->sparql_client = SparqlClient::connection();
     $this->published_id = TranslatedResourceStatus::find_or_create_by_label('Published')->id;
     $this->trusted_id = Vetted::trusted()->id;
     $this->unknown_id = Vetted::unknown()->id;
     $this->untrusted_id = Vetted::untrusted()->id;
     $this->visible_id = Visibility::visible()->id;
     $this->invisible_id = Visibility::invisible()->id;
     $this->master_curator_id = CuratorLevel::master_curator()->id;
     $this->full_curator_id = CuratorLevel::full_curator()->id;
     $this->assistant_curator_id = CuratorLevel::assistant_curator()->id;
     $this->curator_ids = CuratorLevel::curator_ids();
     $this->data_object_scope = ChangeableObjectType::data_object_scope();
     $this->worms_content_partner_id = ContentPartner::find_or_create_by_full_name('World Register of Marine Species')->id;
     $this->col_hierarchy_id = Hierarchy::find_or_create_by_label('Species 2000 & ITIS Catalogue of Life: Annual Checklist 2011')->id;
     $this->latest_harvest_event_ids();
     $this->worms_latest_harvest_event_id();
 }