Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x
  2. ServiceFactory.php

function ServiceFactory::getService

Get service

Parameters

string $serviceName Name of service:

Return value

object

File

vendor/lullabot/php-webdriver/lib/WebDriver/ServiceFactory.php, line 73

Class

ServiceFactory
WebDriver\ServiceFactory class

Namespace

WebDriver

Code

public function getService($serviceName) {
    if (!isset($this->services[$serviceName])) {
        $className = $this->serviceClasses[$serviceName];
        $this->services[$serviceName] = new $className();
    }
    return $this->services[$serviceName];
}
RSS feed
Powered by Drupal