Пример #1
0
 /**
  * @vcr input_helper_org_helpers
  */
 function testOrgList()
 {
     $org_list = Input::orgList();
     $this->assertInternalType('array', $org_list);
     $this->assertArrayHasKey('-', $org_list);
     $this->assertArrayHasKey('d59379eb-0c23-429c-a7bc-ff51e0a960c2', $org_list);
 }
 /**
  * Retrieves the model of the given ID
  *
  * @param string $id ID or name of desired organization
  * @return UserOrganizationMembership $model
  */
 public function get($id)
 {
     $orgs = $this->getMembers();
     $org_list = \Terminus\Helpers\Input::orgList();
     $model = null;
     if (isset($orgs[$id])) {
         $model = $this->models[$id];
     } elseif (($location = array_search($id, $org_list)) !== false) {
         $model = $this->models[$location];
     }
     return $model;
 }