/**
  * @return KalturaPDO
  */
 public static function createSphinxConnection($sphinxServer, $port = 9312)
 {
     $dsn = "mysql:host={$sphinxServer};port={$port};";
     try {
         $con = new KalturaPDO($dsn);
         $con->setCommentsEnabled(false);
         return $con;
     } catch (PropelException $pex) {
         KalturaLog::alert($pex->getMessage());
         throw new PropelException("Database error");
     }
 }
예제 #2
0
 public function getComment()
 {
     if (!self::$comment) {
         $uniqueId = new UniqueId();
         self::$comment = isset($_SERVER["HOSTNAME"]) ? $_SERVER["HOSTNAME"] : gethostname();
         self::$comment .= "[{$uniqueId}]";
     }
     return self::$comment . "[{$this->connectionName}]";
 }