當前位置: 首頁>>代碼示例>>PHP>>正文


PHP Organization::getOrganizationByOrgType方法代碼示例

本文整理匯總了PHP中Organization::getOrganizationByOrgType方法的典型用法代碼示例。如果您正苦於以下問題:PHP Organization::getOrganizationByOrgType方法的具體用法?PHP Organization::getOrganizationByOrgType怎麽用?PHP Organization::getOrganizationByOrgType使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在Organization的用法示例。


在下文中一共展示了Organization::getOrganizationByOrgType方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: setXsrfCookie

 //should already have checked if they're a volunteer, so another check here would be redundant
 if ($method === "GET") {
     //set XSRF cookie
     setXsrfCookie("/");
     //get the organization based on the given field
     if (empty($id) === false) {
         $reply->data = Organization::getOrganizationByOrgId($pdo, $id);
     } else {
         if (empty($city) === false) {
             $reply->data = Organization::getOrganizationByOrgCity($pdo, $city)->toArray();
         } else {
             if (empty($name) === false) {
                 $reply->data = Organization::getOrganizationByOrgName($pdo, $name)->toArray();
             } else {
                 if (empty($type) === false) {
                     $reply->data = Organization::getOrganizationByOrgType($pdo, $type)->toArray();
                 } else {
                     if (empty($zip) === false) {
                         $reply->data = Organization::getOrganizationByOrgZip($pdo, $zip)->toArray();
                     } else {
                         if (empty($current) === false) {
                             //used to fetch the current organization info for angular
                             $reply->data = Organization::getOrganizationByOrgId($pdo, $_SESSION["volunteer"]->getOrgId());
                         } else {
                             $reply->data = Organization::getAllOrganizations($pdo)->toArray();
                         }
                     }
                 }
             }
         }
     }
開發者ID:brbrown59,項目名稱:bread-basket,代碼行數:31,代碼來源:index.php

示例2: testGetInvalidOrganizationByType

 /**
  * test for grabbing an organization by type that does not exist
  */
 public function testGetInvalidOrganizationByType()
 {
     $organization = Organization::getOrganizationByOrgType($this->getPDO(), "Z");
     $this->assertSame($organization->getSize(), 0);
 }
開發者ID:brbrown59,項目名稱:bread-basket,代碼行數:8,代碼來源:organization-test.php


注:本文中的Organization::getOrganizationByOrgType方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。