src/Api/Client.php
public function getAvailableOrganisations($as_simple_array = false)
    {
        $organisations = $this->get('users/' . $this->user_id . '/organisations');
        //If simple array is true, we send back an array with [id] => [name] instead of the full list
        if ($as_simple_array) {
            $temp = [];
            foreach ($organisations as $org) {
                $temp[$org['id']] = $org['name'];
            }
            $organisations = $temp;
        }
        asort($organisations);

        return $organisations;
    }
public function getAvailableOrganisations($as_simple_array = false)
    {
        $organisations = $this->get('users/' . $this->user_id . '/organisations');
        //If simple array is true, we send back an array with [id] => [name] instead of the full list
        if ($as_simple_array) {
            $temp = [];
            foreach ($organisations as $org) {
                $temp[$org['id']] = $org['name'];
            }
            $organisations = $temp;
        }
        asort($organisations);

        return $organisations;
    }
public function getAvailableOrganisations ( $ as_simple_array = false ) { $ organisations = $ this -> get ( 'users/' . $ this -> user_id . '/organisations' ) ; //If simple array is true, we send back an array with [id] => [name] instead of the full list
 if ( $ as_simple_array ) { $ temp = [ ] ; foreach ( $ organisations as $ org ) { $ temp [ $ org [ 'id' ] ] = $ org [ 'name' ] ; } $ organisations = $ temp ; } asort ( $ organisations ) ; return $ organisations ; }
Get all available Hail Organisation the configured client has access to

@param boolean $as_simple_array Return a simple associative array (ID => Tile )instead of the full objects

@return array
@throws
Get all available Hail Organisation the configured client has access to