gets a wsdl instance from the cache

@param string $wsdl The URL of the wsdl instance

@return object wsdl The cached wsdl instance, null if the instance is not in the cache
@access public
555341
function get($wsdl)
    {
        $filename = $this->createFilename($wsdl);
        if ($this->obtainMutex($filename, "r")) {
            // check for expired WSDL that must be removed from the cache
            if ($this->cache_lifetime > 0) {
                if (file_exists($filename) && (time() - filemtime($filename) > $this->cache_lifetime)) {
                    unlink($filename);
                    $this->debug("Expired $wsdl ($filename) from cache");
                    $this->releaseMutex($filename);

                    return NULL;
                }
            }
            // see what there is to return
            if (!file_exists($filename)) {
                $this->debug("$wsdl ($filename) not in cache (1)");
                $this->releaseMutex($filename);

                return NULL;
            }
            $fp = @fopen($filename, "r");
            if ($fp) {
                $s = implode("", @file($filename));
                fclose($fp);
                $this->debug("Got $wsdl ($filename) from cache");
            } else {
                $s = NULL;
                $this->debug("$wsdl ($filename) not in cache (2)");
            }
            $this->releaseMutex($filename);

            return (!is_null($s)) ? unserialize($s) : NULL;
        } else {
            $this->debug("Unable to obtain mutex for $filename in get");
        }

        return NULL;
    }
580095
public static function getInstance($refresh = false)
    {
        if (is_null(self::$environment) || $refresh) {
            self::$environment = new self();
        }

        return self::$environment;
    }
1069206
public static function soapClient($url, $options = null, $transport = null) 
	{
		$options['version'] = 'soap 1.1';
		return self::client($url, $options, $transport);
	}
858197
public static function getInstance($config = null)
    {
        if (!self::$instance) {
            self::$instance = new self($config == null ? ConfigManager::getInstance()->getConfigHashmap() : $config);
        }
        return self::$instance;
    }
842919
public static function instance($prototype = null)
    {
        static $instance = null;
        if ($prototype !== null) {
            $instance = $prototype;
        } elseif ($instance === null || $prototype == true) {
            $instance = new HTMLPurifier_LanguageFactory();
            $instance->setup();
        }
        return $instance;
    }
1219196
protected static function getGitLabClient($url)
    {
        if (null === static::$client || static::$client->getBaseUrl() !== $url) {
            static::$client = new Client(trim($url, '/').'/');
        }

        return static::$client;
    }
606057
public function getInstance($provider)
    {
        $result = null;

        if ($this->container->has('port1_hybrid_auth.' . strtolower($provider) . '_authentication_service')) {
            $result = $this->container
                ->get('port1_hybrid_auth.' . strtolower($provider) . '_authentication_service');
        }

        return $result;
    }
633781
function put($wsdl_instance) {
		$filename = $this->createFilename($wsdl_instance->wsdl);
		$s = serialize($wsdl_instance);
		if ($this->obtainMutex($filename, "w")) {
			$fp = fopen($filename, "w");
			if (! $fp) {
				$this->debug("Cannot write $wsdl_instance->wsdl ($filename) in cache");
				$this->releaseMutex($filename);
				return false;
			}
			fputs($fp, $s);
			fclose($fp);
			$this->debug("Put $wsdl_instance->wsdl ($filename) in cache");
			$this->releaseMutex($filename);
			return true;
		} else {
			$this->debug("Unable to obtain mutex for $filename in put");
		}
		return false;
	}
886254
private function getClass($mixed = null)
        {
            if (is_object($mixed)) {
                return get_class($mixed);
            }

            if (!is_null($mixed)) {
                return $mixed;
            }

            return $this->getCalledClass();
        }
1364307
public function getCacheInstance()
    {
        if (!$this->cacheInstance) {
            $factory             = $this->getCacheFactory();
            $this->cacheInstance = $factory->createService($this);
        }

        return $this->cacheInstance;
    }
1011442
protected function getSoapClient()
    {
      if(!isset($this->wsdl))
        throw new Exception(__METHOD__ .'; No WSDL set');
        
      if(!(is_null($this->client) && $this->client instanceof SoapClient))
        $this->client = new SoapClient($this->wsdl);
          
      return $this->client;
    }
1228322
protected function load($wsdl)
    {
        $this->log('Loading the WSDL');

        $this->wsdl = new WsdlDocument($this->config, $wsdl);

        $this->types = array();

        $this->loadTypes();
        $this->loadService();
    }
879823
function put($wsdl_instance)
    {
        $filename = $this->createFilename($wsdl_instance->wsdl);
        $s        = serialize($wsdl_instance);
        if ($this->obtainMutex($filename, "w")) {
            $fp = fopen($filename, "w");
            if (!$fp) {
                $this->debug("Cannot write $wsdl_instance->wsdl ($filename) in cache");
                $this->releaseMutex($filename);

                return FALSE;
            }
            fputs($fp, $s);
            fclose($fp);
            $this->debug("Put $wsdl_instance->wsdl ($filename) in cache");
            $this->releaseMutex($filename);

            return TRUE;
        } else {
            $this->debug("Unable to obtain mutex for $filename in put");
        }

        return FALSE;
    }
54738
public static function get( $url ) {
		$cache = get_transient( static::_get_meta_key( $url ) );
		$cache = ! $cache || ! is_array( $cache ) ? [] : $cache;
		return $cache;
	}
1294588
public function &getService($service)
    {

        $classServiceName = basename($service);
        if (isset($this->$classServiceName)) {
            return $this->$classServiceName;
        } else {
            $service = ucfirst($service);
            $factoryClass = $service . "Factory";

            if (class_exists($factoryClass)) {
                $factory = new $factoryClass();
                if ($factory instanceof ServiceFactory) {
                    if (!$this->isUnderConstruction($service)) {
                        $this->underConstruction($service);
                        $newService = $factory->create();
                        $this->constructed($service);
                    } else {
                        if(isset($this->proxyObjects[$classServiceName])) {
                            return $this->proxyObjects[$classServiceName];
                        }else{
                            return $this->$classServiceName;
                        }
                    }

                    $this->$classServiceName = $newService;
                    return $newService;
                }
            }

            if (!$this->isUnderConstruction($service)) {
                $this->underConstruction($service);
                $object = new $service();
                if ($object instanceof ServiceFactory) {
                    $newService = $object->create();
                } else {
                    $newService = $object;
                }
                $this->constructed($service);
            } else {
                if(isset($this->proxyObjects[$classServiceName])) {
                    return $this->proxyObjects[$classServiceName];
                }else{
                    return $this->$classServiceName;
                }
            }

            $this->$classServiceName = $newService;
            return $newService;
        }
    }
69753
public function get(string $class)
    {
        if (isset($this->instantiated[$class]) && $this->shared[$class]) {
            return $this->instantiated[$class];
        }

        $args = $this->services[$class];

        switch (count($args)) {
            case 0:
                $object = new $class();
                break;
            case 1:
                $object = new $class($args[0]);
                break;
            case 2:
                $object = new $class($args[0], $args[1]);
                break;
            case 3:
                $object = new $class($args[0], $args[1], $args[2]);
                break;
            default:
                throw new \OutOfRangeException('Too many arguments given');
        }

        if ($this->shared[$class]) {
            $this->instantiated[$class] = $object;
        }

        return $object;
    }
281425
public function make($class, $wsdl, array $config = [])
    {
        $reflectionClass = new ReflectionClass($class);

        /** @var SoapClient $client */
        $client = $reflectionClass->newInstanceArgs([ $wsdl, $config ]);

        return $client;
    }