ec2dns\ec2dns::resolve PHP Метод

resolve() защищенный Метод

This method resolves tags to IPs via ec2host.
protected resolve ( string $type, string $tag ) : false | string
$type string
$tag string
Результат false | string
    protected function resolve($type, $tag)
    {
        if ($dnsCache = $this->getCache($type, $tag)) {
            return $dnsCache['ip'];
        } else {
            $ec2host = new ec2host(clone $this->ec2, $tag);
            if ($ec2host->instances) {
                $ip = gethostbyname($ec2host->instances[0]['dnsName']);
                $this->setCache($type, $tag, $ip);
                return $ip;
            } else {
                return false;
            }
        }
    }