public function getWsdl()
{
if ($this->_wsdlUri === '') {
$provider = $this->getProvider();
$providerClass = ($pos = strrpos($provider, '.')) !== false ? substr($provider, $pos + 1) : $provider;
Prado::using($provider);
if ($this->getApplication()->getMode() === TApplicationMode::Performance && ($cache = $this->getApplication()->getCache()) !== null) {
$wsdl = $cache->get(self::WSDL_CACHE_PREFIX . $providerClass);
if (is_string($wsdl)) {
return $wsdl;
}
$wsdl = WsdlGenerator::generate($providerClass, $this->getUri(), $this->getEncoding());
$cache->set(self::WSDL_CACHE_PREFIX . $providerClass, $wsdl);
return $wsdl;
} else {
return WsdlGenerator::generate($providerClass, $this->getUri(), $this->getEncoding());
}
} else {
return file_get_contents($this->_wsdlUri);
}
}