public function tenants($token = NULL) {
    $url = $this->url() . '/tenants';

    if (empty($token)) {
      $token = $this->token();
    }

    $headers = array(
      'X-Auth-Token' => $token,
      'Accept' => 'application/json',
      //'Content-Type' => 'application/json',
    );

    $client = \HPCloud\Transport::instance();
    $response = $client->doRequest($url, 'GET', $headers);

    $raw = $response->content();
    $json = json_decode($raw, TRUE);

    return $json['tenants'];

  }
public function tenants($token = NULL) {
    $url = $this->url() . '/tenants';

    if (empty($token)) {
      $token = $this->token();
    }

    $headers = array(
      'X-Auth-Token' => $token,
      'Accept' => 'application/json',
      //'Content-Type' => 'application/json',
    );

    $client = \HPCloud\Transport::instance();
    $response = $client->doRequest($url, 'GET', $headers);

    $raw = $response->content();
    $json = json_decode($raw, TRUE);

    return $json['tenants'];

  }
public function tenants ( $ token = NULL ) { $ url = $ this -> url ( ) . '/tenants' ; if ( empty ( $ token ) ) { $ token = $ this -> token ( ) ; } $ headers = array ( 'X-Auth-Token' => $ token , 'Accept' => 'application/json' , //'Content-Type' => 'application/json', ) ; $ client = \ HPCloud \ Transport :: instance ( ) ; $ response = $ client -> doRequest ( $ url , 'GET' , $ headers ) ; $ raw = $ response -> content ( ) ; $ json = json_decode ( $ raw , TRUE ) ; return $ json [ 'tenants' ] ; }
Get a list of all tenants associated with this account.

If a valid token is passed into this object, the method can be invoked
before authentication. However, if no token is supplied, this attempts
to use the one returned by an authentication call.

Returned data will follow this format:

@code
<?php
array(
array(
"id" =>  "395I91234514446",
"name" => "Banking Tenant Services",
"description" => "Banking Tenant Services for TimeWarner",
"enabled" => TRUE,
"created" => "2011-11-29T16:59:52.635Z",
"updated" => "2011-11-29T16:59:52.635Z",
),
);
?>
@endcode

Note that this method invokes a new request against the remote server.

@retval array
@return array
An indexed array of tenant info. Each entry will be an associative
array containing tenant details.
@throws HPCloud::Transport::AuthorizationException
If authentication failed.
@throws HPCloud::Exception
For abnormal network conditions. The message will give an indication as
to the underlying problem.
Get a list of all tenants associated with this account .