Example #1
0
 /**
  * Creates a unique cache prefix to help prevent cache conflicts
  * 
  * @return void
  */
 private function makeCachePrefix()
 {
     $prefix = 'fSchema::' . $this->database->getType() . '::';
     if ($this->database->getHost()) {
         $prefix .= $this->database->getHost() . '::';
     }
     if ($this->database->getPort()) {
         $prefix .= $this->database->getPort() . '::';
     }
     $prefix .= $this->database->getDatabase() . '::';
     if ($this->database->getUsername()) {
         $prefix .= $this->database->getUsername() . '::';
     }
     return $prefix;
 }
 /**
  * Creates a unique cache prefix to help prevent cache conflicts
  * 
  * @return string  The cache prefix to use
  */
 private function makeCachePrefix()
 {
     if (!$this->cache_prefix) {
         $prefix = 'fSQLTranslation::' . $this->database->getType() . '::';
         if ($this->database->getHost()) {
             $prefix .= $this->database->getHost() . '::';
         }
         if ($this->database->getPort()) {
             $prefix .= $this->database->getPort() . '::';
         }
         $prefix .= $this->database->getDatabase() . '::';
         if ($this->database->getUsername()) {
             $prefix .= $this->database->getUsername() . '::';
         }
         $this->cache_prefix = $prefix;
     }
     return $this->cache_prefix;
 }