protected function getClientId($client)
    {
        if ($client instanceof Client) {
            if (!empty($client->id)) {
                $id = $client->id;
            } elseif (!empty($client->email)) {
                $id = $this->api->searchClientId($client->email);
            } else {
                throw new YouHostingException("You need to provide either a client ID (recommended) or client e-mail to search for");
            }
        } elseif (is_numeric($client)) {
            $id = $client;
        } else {
            $id = $this->api->searchClientId($client);
        }

        return (int)$id;
    }
protected function getClientId($client)
    {
        if ($client instanceof Client) {
            if (!empty($client->id)) {
                $id = $client->id;
            } elseif (!empty($client->email)) {
                $id = $this->api->searchClientId($client->email);
            } else {
                throw new YouHostingException("You need to provide either a client ID (recommended) or client e-mail to search for");
            }
        } elseif (is_numeric($client)) {
            $id = $client;
        } else {
            $id = $this->api->searchClientId($client);
        }

        return (int)$id;
    }
protected function getClientId ( $ client ) { if ( $ client instanceof Client ) { if ( ! empty ( $ client -> id ) ) { $ id = $ client -> id ; } elseif ( ! empty ( $ client -> email ) ) { $ id = $ this -> api -> searchClientId ( $ client -> email ) ; } else { throw new YouHostingException ( "You need to provide either a client ID (recommended) or client e-mail to search for" ) ; } } elseif ( is_numeric ( $ client ) ) { $ id = $ client ; } else { $ id = $ this -> api -> searchClientId ( $ client ) ; } return ( int ) $ id ; }
Get the client ID from a Client object, e-mail or id

@param Client|string|int $client
@return int
@throws YouHostingException
Get the client ID from a Client object e - mail or id