コード例 #1
0
ファイル: BaseFQLTestCase.php プロジェクト: jkinner/ringside
 public function setUp()
 {
     parent::setUp();
     $dbCon = RingsideApiDbDatabase::getConnection();
     $this->assertNotNull($dbCon);
     $this->m_fqlEngine = FQLEngine::getInstance($dbCon);
 }
コード例 #2
0
ファイル: FqlQuery.php プロジェクト: jkinner/ringside
 public function execute()
 {
     $dbCon = RingsideApiDbDatabase::getDatabaseConnection();
     $fqlEngine = FQLEngine::getInstance($dbCon);
     $result = null;
     try {
         //execute query
         $result = $fqlEngine->query($this->getAppId(), $this->getUserId(), $this->m_query);
     } catch (FQLException $exception) {
         throw new OpenFBAPIException($exception->getMessage(), FB_ERROR_CODE_DATABASE_ERROR);
     }
     return $result;
 }
コード例 #3
0
ファイル: User.php プロジェクト: jkinner/ringside
 public static function getInfo($apiParams, $app_id, $uid)
 {
     $dbCon = RingsideApiDbDatabase::getDatabaseConnection();
     $fqlEngine = FQLEngine::getInstance($dbCon);
     $fieldNames = explode(",", $apiParams["fields"]);
     if (array_search("uid", $fieldNames) === false) {
         $fieldNames[] = "uid";
     }
     $uids = explode(",", $apiParams["uids"]);
     //list of user hierarchies
     $result = null;
     try {
         //construct base FQL for queries
         $fql = "SELECT " . implode(",", $fieldNames) . " FROM user WHERE uid IN (" . implode(",", $uids) . ")";
         $result = $fqlEngine->query($app_id, $uid, $fql);
     } catch (FQLException $exception) {
         throw new OpenFBAPIException($exception->getMessage(), FB_ERROR_CODE_DATABASE_ERROR);
     }
     return $result;
 }