当前位置: 首页>>代码示例>>PHP>>正文


PHP ParseQuery::doesNotExist方法代码示例

本文整理汇总了PHP中Parse\ParseQuery::doesNotExist方法的典型用法代码示例。如果您正苦于以下问题:PHP ParseQuery::doesNotExist方法的具体用法?PHP ParseQuery::doesNotExist怎么用?PHP ParseQuery::doesNotExist使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Parse\ParseQuery的用法示例。


在下文中一共展示了ParseQuery::doesNotExist方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: getSeekers

function getSeekers()
{
    $query = new ParseQuery("BagTransaction");
    $query->doesNotExist("status");
    $results = $query->find();
    $users = array();
    //convert BagTransactions to Users
    foreach ($results as $result) {
        $user = $result->get("borrower");
        $user->fetch();
        $users[] = $user;
    }
    return $users;
}
开发者ID:bfullam,项目名称:HackBag,代码行数:14,代码来源:funcs.php

示例2: testDoesNotExistRelation

 public function testDoesNotExistRelation()
 {
     Helper::clearClass("Item");
     $this->saveObjects(9, function ($i) {
         $obj = ParseObject::create("TestObject");
         if ($i & 1) {
             $obj->set('y', $i);
         } else {
             $item = ParseObject::create("Item");
             $item->set('x', $i);
             $obj->set('x', $i);
         }
         return $obj;
     });
     $query = new ParseQuery("TestObject");
     $query->doesNotExist('x');
     $results = $query->find();
     $this->assertEquals(4, count($results), 'Did not return correct number of objects.');
 }
开发者ID:rvdavid,项目名称:parse-php-sdk,代码行数:19,代码来源:ParseQueryTest.php

示例3: header

                $response->errorDescription = "master key empty.";
            }
        }
    }
    header('Content-type: application/json');
    echo stripslashes(json_encode($response));
} else {
    ParseClient::initialize(PARSE_APPLICATION_ID, PARSE_REST_API_KEY, PARSE_MASTER_KEY);
    $subFolderPath = 'images';
    // SubFolder検出
    $queryStoreSubFolder = new ParseQuery(IDF_STORE_SUB_FOLDER_CLASS_NAME);
    $s_folderSelector = htmlspecialchars($_POST['selector'], ENT_QUOTES);
    if (strlen($s_folderSelector) > 0) {
        $queryStoreSubFolder->equalTo('selector', $s_folderSelector);
    } else {
        $queryStoreSubFolder->doesNotExist('selector');
    }
    // サブフォルダを検索
    $resultsStoreSubFolder = $queryStoreSubFolder->find();
    // ランダムで取得
    if (count($resultsStoreSubFolder)) {
        $subfolderObject = $resultsStoreSubFolder[array_rand($resultsStoreSubFolder, 1)];
        $subFolderPath = $subfolderObject->get('path');
        $dir = getcwd() . '/' . $subFolderPath;
        if (!is_dir($dir)) {
            if (!mkdir($dir)) {
                throw new RuntimeException('Failed to create directory: ' . $dir);
            }
            chmod($dir, 0777);
        }
    }
开发者ID:notoroid,项目名称:IDPCompositePixStorage,代码行数:31,代码来源:image_upload.php

示例4: whereNotExists

 public function whereNotExists($key)
 {
     $this->parseQuery->doesNotExist($key);
     return $this;
 }
开发者ID:parziphal,项目名称:parse,代码行数:5,代码来源:Query.php

示例5: getOpenBikesWithinDistance

 function getOpenBikesWithinDistance($latitude, $longitude, $radius)
 {
     $point = new ParseGeoPoint($latitude, $longitude);
     $query = new ParseQuery("Bikes");
     $query->includeKey("currentUser");
     $query->doesNotExist("currentUser");
     $query->withinMiles("lastLocation", $point, $radius);
     $query->limit(1000);
     $results = $query->find();
     $count = count($results);
     $listOfBikes = array();
     for ($i = 0; $i < $count; $i++) {
         $bike = $results[$i];
         $ID = $bike->getObjectId();
         $point = $bike->get("lastLocation");
         $lat = $point->getLatitude();
         $long = $point->getLongitude();
         $object = new stdClass();
         $object->bikeID = $ID;
         $object->latitude = $lat;
         $object->longitude = $long;
         array_push($listOfBikes, $object);
     }
     return $listOfBikes;
 }
开发者ID:es2fq,项目名称:BaasAPI,代码行数:25,代码来源:BaasAPI.php


注:本文中的Parse\ParseQuery::doesNotExist方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。