public function stackExists(Image $client, $stackName, $organizationName = '')
    {
        try {
            $stack = $client->getStack($stackName, $organizationName);

            return $stack->getName() == $stackName;
        } catch (ClientException $e) {
            if (404 === $e->getCode()) {
                return false;
            }

            throw $e;
        }
    }
public function stackExists(Image $client, $stackName, $organizationName = '')
    {
        try {
            $stack = $client->getStack($stackName, $organizationName);

            return $stack->getName() == $stackName;
        } catch (ClientException $e) {
            if (404 === $e->getCode()) {
                return false;
            }

            throw $e;
        }
    }
public function stackExists ( Image $ client , $ stackName , $ organizationName = '' ) { try { $ stack = $ client -> getStack ( $ stackName , $ organizationName ) ; return $ stack -> getName ( ) == $ stackName ; } catch ( ClientException $ e ) { if ( 404 === $ e -> getCode ( ) ) { return false ; } throw $ e ; } }
Checks if the specified stack exists in the organization.

@param $stackName
@param $organizationName
@param Image $client

@return bool
Checks if the specified stack exists in the organization .