예제 #1
0
 /**
  * @return DataMap
  */
 public function datamap()
 {
     if (!$this->datamap instanceof DataMap) {
         $this->datamap = new DataMap();
         $this->datamap->setFetchStyle(\PDO::FETCH_ASSOC);
     }
     return $this->datamap;
 }
예제 #2
0
 /**
  * Constructor
  * 
  * @param string $connection	[optional] database connection info
  * @param string $username		[optional] username to connect with
  * @param string $password		[optional] password to connect with
  */
 public function __construct($connection = null, $username = null, $password = null)
 {
     parent::__construct($connection, $username, $password);
     $languages = $this->registry->getConfig("languages");
     if ($languages != "") {
         $this->primary_language = (string) $languages->language["code"];
     }
     // searchable fields
     $this->searchable_fields = explode(",", $this->registry->getConfig("DATABASE_SEARCHABLE_FIELDS", false, "title_display,title_full,description,keyword,alt_title"));
 }
예제 #3
0
 /**
  * Constructor
  * 
  * @param string $connection	[optional] database connection info
  * @param string $username		[optional] username to connect with
  * @param string $password		[optional] password to connect with
  */
 public function __construct($targetnames = null, $connection = null, $username = null, $password = null)
 {
     parent::__construct($connection, $username, $password);
     $languages = $this->registry->getConfig("languages");
     if ($languages != "") {
         $this->primary_language = (string) $languages->language["code"];
     }
     $this->targetnames = $targetnames;
     // searchable fields
     //		$this->searchable_fields = explode(",", $this->registry->getConfig("TARGET_SEARCHABLE_FIELDS", false,
     //			"title_display,title_short,description"));
 }
예제 #4
0
 public function __construct($id)
 {
     parent::__construct();
     $this->id = $id;
 }