Get the ping instance.

@throws \InvalidArgumentException

@return \JJG\Ping
Return the ping instance.
9619
protected function getPingInstance()
    {
        if (empty($this->port)) {
            throw new \InvalidArgumentException(
                'Missing host port, ensure you called setPort().'
            );
        }
        $instance = $this->createPing();
        $instance
            ->setPort($this->port);

        return $instance;
    }
226095
public static function getFacadeRoot() {
        $accessor = static::getFacadeAccessor();
        $instance = Application::getInstance()->make($accessor);
        if ($instance == null) {
            throw new Exception('Facade get null for: '.$accessor);
        }
        return $instance;
    }
1203967
public function ping() {

		$canConnect = false;

		foreach ( $this->httpRequests as $httpRequest ) {
			if ( !$httpRequest->ping() ) {
				return false;
			}

			$canConnect = true;
		}

		return $canConnect;
	}
514307
final public static function getInstance()
    {
        $className = get_called_class();
        if (!isset(self::$_instances[$className])) {
            $instance = new $className();
            /* @var SingleTon $instance */
            $instance->init();
            self::$_instances[$className] = $instance;
        }
        return self::$_instances[$className];
    }
230585
public function getInstance() {
        if(!$this->isInstanceLoaded()) {
            $inst = $this->loadInstance();
            if(!$this->instance)
                $this->instance = $inst;
        }
		return $this->instance;
	}
569289
private function getServer()
    {
        if ($this->server) {
            return $this->server;
        }
        if (isset($this->options['serverId']) && !empty($this->options['serverId'])) {
            return $this->server = $this->getDbCluster()
                ->getServer($this->options['serverId']);
        }

        return $this->server = $this->getDbCluster()
            ->getMaster();
    }
817135
public function getResponse()
    {
        if (! $this->_response instanceof LibBaseDispatcherResponse) {
            $this->_response = parent::getResponse();

            if (! $this->_response instanceof LibBaseDispatcherResponse) {
                throw new InvalidArgumentException(
                    'Response: '.get_class($this->_response).' must be an intance of LibBaseDispatcherResponse'
                );
            }

            $this->_response->setRequest($this->getRequest());
        }

        return $this->_response;
    }
979136
public static function instance() {
        global $CFG;
        if (is_null(self::$singletoninstance)) {
            if (!empty($CFG->perfdebug) and $CFG->perfdebug > 7) {
                self::$singletoninstance = new performance_measuring_filter_manager();
            } else {
                self::$singletoninstance = new self();
            }
        }
        return self::$singletoninstance;
    }
476544
public static function getInstance()
    {
        if (!static::$instance instanceof self) {
            static::$instance = $session = new self();
            if (!$session->isStarted()) {
                $session->start();
            }
        }

        return static::$instance;
    }
155630
public function getMinHost()
    {
        if ($this->network_size === 32 || $this->network_size === 31) {
            return $this->ip_address;
        }
        return $this->minHostCalculation(self::FORMAT_QUADS, '.');
    }
1022628
public static function getInstance()
    {
        if (!function_exists("curl_init")) {
            Error::throwError("cine");
        }

        static $inst = null;
        if ($inst === null) {
            $inst = new Connection();
            $inst->client_user_agent = $inst->getBaseClientUserAgent();
        }
        return $inst;
    }
793180
protected static function getInstance()
    {
        $class = get_called_class();

        if (!isset(self::$instance[$class]) || !self::$instance[$class] instanceof $class) {
            self::$instance[$class] = new static();
        }

        return static::$instance[$class];
    }
1344399
public function cache()
    {
        $paramCount = func_num_args();

        if (1 === $paramCount) {
            return $this["cache"]->get(func_get_arg(0));
        }

        if (2 === $paramCount) {
            return $this["cache"]->set(func_get_arg(0), func_get_arg(1));
        }

        if (3 === $paramCount) {
            return $this["cache"]->set(func_get_arg(0), func_get_arg(1), func_get_arg(2));
        }

        throw new InvalidArgumentException("App::cache() method expects 1 or 2(3) parameters. {$paramCount} given.");
    }
259534
public static function getInstance() {

		if( !isset( self::$instance ) ) {

			self::$instance	= new PaymentProperties();

			self::$instance->init( PaymentGlobal::CONFIG_PAYMENT );
		}

		return self::$instance;
	}
5065
public static function getInstance() {

		if( !isset( self::$instance ) ) {

			self::$instance	= new CoreProperties();

			self::$instance->init( CoreGlobal::CONFIG_CORE );
		}

		return self::$instance;
	}
527666
protected function getServer()
    {
        $server = new Server();
        $server->setHost($this->getHost())
            ->setRoot($this->getServerRoot())
            ->setBranch($this->getServerBranch())
            ->setCodeVersion($this->getServerCodeVersion());
        $extras = $this->getServerExtras();
        if (!$extras) {
            $extras = array();
        }

        $server->setExtras($extras);
        if (isset($_SERVER) && array_key_exists('argv', $_SERVER)) {
            $server->setArgv($_SERVER['argv']);
        }
        return $server;
    }
1241851
protected function getClient()
	{
		$this->client->timeout       = $this->timeout;
		$this->client->sslVerifyPeer = $this->sslVerifyPeer;

		return $this->client;
	}