public function resolvePlatform(EventManager $eventManager)
	{
		$eventManager->attachSubscriber(new ConnectionAttemptSubscriber());

		if (!$this->connectionManager instanceof ConnectionInterface) {
			throw new RuntimeException('Connection must implement \ConnectionInterface');
		}

		$reflector = new \ReflectionClass($this->connectionManager);
		$connections = $reflector->getProperty('platformConnector');
		$connections->setAccessible('public');
		$connections = $connections->getValue($this->connectionManager);
		$resolvedProvider = $this->getPlatformProvider($connections, $eventManager);

		if (!$resolvedProvider) {
			$resolvedProvider = $this->getPlatformProvider(
				$this->connectionManager->getAlternativeId(ConnectionManager::USE_ALT_KEY), $eventManager
			);
		}

		if (!is_null($resolvedProvider) && $resolvedProvider == false) {
			throw new RuntimeException('Unable to resolve database platform.');
		}

		// If connection was successfully established, dispatch `connect.created` event.
		$this->platformProvider->eventManager->dispatchEvent('connect.created');
		return $resolvedProvider;
	}
public function resolvePlatform(EventManager $eventManager)
	{
		$eventManager->attachSubscriber(new ConnectionAttemptSubscriber());

		if (!$this->connectionManager instanceof ConnectionInterface) {
			throw new RuntimeException('Connection must implement \ConnectionInterface');
		}

		$reflector = new \ReflectionClass($this->connectionManager);
		$connections = $reflector->getProperty('platformConnector');
		$connections->setAccessible('public');
		$connections = $connections->getValue($this->connectionManager);
		$resolvedProvider = $this->getPlatformProvider($connections, $eventManager);

		if (!$resolvedProvider) {
			$resolvedProvider = $this->getPlatformProvider(
				$this->connectionManager->getAlternativeId(ConnectionManager::USE_ALT_KEY), $eventManager
			);
		}

		if (!is_null($resolvedProvider) && $resolvedProvider == false) {
			throw new RuntimeException('Unable to resolve database platform.');
		}

		// If connection was successfully established, dispatch `connect.created` event.
		$this->platformProvider->eventManager->dispatchEvent('connect.created');
		return $resolvedProvider;
	}
public function resolvePlatform ( EventManager $ eventManager ) { $ eventManager -> attachSubscriber ( new ConnectionAttemptSubscriber ( ) ) ; if ( ! $ this -> connectionManager instanceof ConnectionInterface ) { throw new RuntimeException ( 'Connection must implement \ConnectionInterface' ) ; } $ reflector = new \ ReflectionClass ( $ this -> connectionManager ) ; $ connections = $ reflector -> getProperty ( 'platformConnector' ) ; $ connections -> setAccessible ( 'public' ) ; $ connections = $ connections -> getValue ( $ this -> connectionManager ) ; $ resolvedProvider = $ this -> getPlatformProvider ( $ connections , $ eventManager ) ; if ( ! $ resolvedProvider ) { $ resolvedProvider = $ this -> getPlatformProvider ( $ this -> connectionManager -> getAlternativeId ( ConnectionManager :: USE_ALT_KEY ) , $ eventManager ) ; } if ( ! is_null ( $ resolvedProvider ) && $ resolvedProvider == false ) { throw new RuntimeException ( 'Unable to resolve database platform.' ) ; } // If connection was successfully established, dispatch `connect.created` event. $ this -> platformProvider -> eventManager -> dispatchEvent ( 'connect.created' ) ; return $ resolvedProvider ; }
Resolve provided connection's platform.

@param 	$eventManager <Kit\Glider\Events\EventManager>
@access 	public
@return 	<Object> <Kit\Glider\Platform\Contract\PlatformProvider>
Resolve provided connection s platform .