maps the browser maker

@param string      $browserMaker
@param string|null $browserName

@return string|null
492514
public function mapBrowserMaker(string $browserMaker, ?string $browserName = null): ?string
    {
        return (new BrowserMakerMapper())->mapBrowserMaker($browserMaker, $browserName);
    }
827732
public function getRouteByName($routeName)
    {
        if (!empty($this->routeNameMap[$routeName])) {
            return $this->routeNameMap[$routeName];
        }

        return null;
    }
790921
public function getComponentFactory($tagName)
    {
        //check for alias first
        if(isset($this->alias[$tagName])) {
            $tagName = $this->alias[$tagName];
        }

        if(
            isset($this->componentFactory[$tagName])
            && $this->componentFactory[$tagName] instanceof ComponentFactoryInterface
        ) {
            return $this->componentFactory[$tagName];
        }

        return null;
    }
1014657
private function getEnabledMappingsByModuleName($moduleName)
    {
        $mappingsToAdd = array();

        foreach ($this->mappings->listByModuleName($moduleName) as $repositoryPath => $mapping) {
            if ($mapping->isEnabled()) {
                // Remove duplicates
                $mappingsToAdd[$mapping->getRepositoryPath()] = $mapping;
            }
        }

        return $mappingsToAdd;
    }
814337
public final function on( $eventName, $eventCallback ) {
			
			if ( !is_string( $eventName ) ) {
			
				throw new \browserfs\Exception('Invalid argument $eventName: string expected');
			
			} else {
			
				if ( !strlen( $eventName ) ) {
			
					throw new \browserfs\Exception('Invalid argument $eventName: expected non-empty string');
			
				} else {
			
					if ( !is_callable( $eventCallback ) ) {
			
						throw new \browserfs\Exception('Invalid argument $eventCallback: callable expected' );
			
					} else {

						$this->events[ $eventName ] = isset( $this->events[ $eventName ] ) 
							? $this->events[ $eventName ] 
							: [];

						$this->events[ $eventName ][] = [
							'once' => false,
							'callback' => $eventCallback,
							'fireId' => 0
						];

					}
				}
			}

		}
1025263
protected function callCustomCreator($driverName)
    {
        list($driver, $name) = $this->getDriverName($driverName);
        return call_user_func($this->customCreators[$driver], $this->app, $name);
    }
459627
public function mapDeviceMaker(string $deviceMaker, ?string $deviceName = null): ?string
    {
        if (null === $deviceName) {
            return null;
        }

        switch (mb_strtolower($deviceName)) {
            case '':
            case 'unknown':
            case 'other':
            case 'various':
            case 'android 1.6':
            case 'android 2.0':
            case 'android 2.1':
            case 'android 2.2':
            case 'android 2.3':
            case 'android 3.0':
            case 'android 3.1':
            case 'android 3.2':
            case 'android 4.0':
            case 'android 4.1':
            case 'android 4.2':
            case 'android 4.3':
            case 'android 4.4':
            case 'android 5.0':
            case 'android 2.2 tablet':
            case 'android 4 tablet':
            case 'android 4.1 tablet':
            case 'android 4.2 tablet':
            case 'android 4.3 tablet':
            case 'android 4.4 tablet':
            case 'android 5.0 tablet':
            case 'disguised as macintosh':
            case 'mini 1':
            case 'mini 4':
            case 'mini 5':
            case 'windows mobile 6.5':
            case 'windows mobile 7':
            case 'windows mobile 7.5':
            case 'windows phone 7':
            case 'windows phone 8':
            case 'fennec tablet':
            case 'tablet on android':
            case 'fennec':
            case 'opera for series 60':
            case 'opera mini for s60':
            case 'windows mobile (opera)':
            case 'mobi for android':
            case 'mozilla firefox for android':
            case 'firefox for android tablet':
            case 'firefox for android':
                $deviceMaker = null;
                break;
            // Motorola
            case 'motomz616':
            case 'motoxt610':
            case 'motxt912b':
                $deviceMaker = 'Motorola';
                break;
            // LG
            case 'lg/c550/v1.0':
                $deviceMaker = 'LG';
                break;
            // Samsung
            case 'gt s8500':
            case 'gp-p6810':
            case 'gt-i8350':
            case 'gt-i9001':
            case 'gt-i9100':
            case 'gt-i9300':
            case 'samsung gt-i9300/i9300xxdlih':
            case 'gt i7500':
            case 'gt-p5110':
            case 'gt s5620':
            case 'sch-i699':
            case 'sgh-i917':
            case 'sgh-i957':
            case 'sgh-i900v':
            case 'sgh i900':
            case 'sph-930':
                $deviceMaker = 'Samsung';
                break;
            // Acer
            case 'acer e310':
            case 'acer e320':
                $deviceMaker = 'Acer';
                break;
            // HTC
            case 'sensationxe beats z715e':
            case 's510b':
            case 'htc desire sv':
                $deviceMaker = 'HTC';
                break;
            // Asus
            case 'asus-padfone':
                $deviceMaker = 'Asus';
                break;
            // Creative
            case 'creative ziio7':
                $deviceMaker = 'Creative';
                break;
            // HP
            case 'touchpad':
                $deviceMaker = 'HP';
                break;
            // Huawei
            case 'u8800':
                $deviceMaker = 'Huawei';
                break;
            // Amazon
            case 'd01400':
                $deviceMaker = 'Amazon';
                break;
            // Nokia
            case 'nokia asha 201':
            case 'nokia unrecognized ovi browser':
                $deviceMaker = 'Nokia';
                break;
            // Medion
            case 'p9514':
            case 'lifetab p9514':
            case 'lifetab s9512':
                $deviceMaker = 'Medion';
                break;
            // Apple
            case 'ipad':
            case 'iphone':
                $deviceMaker = 'Apple Inc';
                break;
            default:
                $deviceMaker = (new MakerMapper())->mapMaker($deviceMaker);
                break;
        }

        return $deviceMaker;
    }
741275
public function bind($typeName)
	{
		if($this->proxyTypes !== NULL)
		{
			$this->proxyTypes = NULL;
		}
		
		$key = strtolower($typeName);
		
		switch($key)
		{
			case 'koolkode\config\configuration':
			case 'koolkode\context\containerinterface':
			case 'koolkode\context\exposedcontainerinterface':
			case 'koolkode\context\scope\scopedcontainerinterface':
				throw new \InvalidArgumentException(sprintf('Binding %s is forbidden', $typeName));
		}
		
		if(isset($this->bindings[$key]))
		{
			return $this->bindings[$key];
		}
		
		return $this->bindings[$key] = new Binding($typeName);
	}
289675
private function getFactoryMapping(ContainerInterface $serviceLocator, $name)
    {
        $matches = [];

        if (! preg_match(
            '/^doctrine\.((?<mappingType>orm|odm)\.|)(?<serviceType>[a-z0-9_]+)\.(?<serviceName>[a-z0-9_]+)$/',
            $name,
            $matches
        )) {
            return false;
        }

        $config      = $serviceLocator->get('config');
        $mappingType = $matches['mappingType'];
        $serviceType = $matches['serviceType'];
        $serviceName = $matches['serviceName'];

        if ($mappingType == '') {
            if (! isset($config['doctrine_factories'][$serviceType]) ||
                 ! isset($config['doctrine'][$serviceType][$serviceName])
            ) {
                return false;
            }

            return [
                'serviceType'  => $serviceType,
                'serviceName'  => $serviceName,
                'factoryClass' => $config['doctrine_factories'][$serviceType],
            ];
        } else {
            if (! isset($config['doctrine_factories'][$mappingType]) ||
                 ! isset($config['doctrine_factories'][$mappingType][$serviceType]) ||
                 ! isset($config['doctrine'][$mappingType][$serviceType][$serviceName])
            ) {
                return false;
            }
            return [
                'serviceType'  => $serviceType,
                'serviceName'  => $serviceName,
                'factoryClass' => $config['doctrine_factories'][$mappingType][$serviceType],
            ];
        }
    }
1308822
public function start($browserName = null)
    {
        if ($this->started) {
            throw new Exception\ConnectionException('Client is already started');
        }

        if (!$this->con->isProxyStarted()) {
            throw new Exception\ConnectionException('Sahi proxy seems not running');
        }

        // open browser if connection uses custom SID (not defaultly autogenerated)
        if (!$this->con->isCustomSidProvided()) {
            if (null === $browserName) {
                throw new \InvalidArgumentException('Specify browser to run in');
            }

            $this->con->start($browserName);

            $limit = 600;
            while (!$this->con->isReady()) {
                usleep(100000);
                if (--$limit <= 0) {
                    throw new Exception\ConnectionException(
                        'Connection time limit reached'
                    );
                }
            }

            $this->browserAutoruned = true;
        } elseif (!$this->con->isReady()) {
            throw new Exception\ConnectionException(sprintf(
                "Can not connect to Sahi session with id \"%s\".\n".
                "Start Sahi session in target browser by opening:\n".
                "http://sahi.example.com/_s_/dyn/Driver_start?sahisid=%s&startUrl=http://sahi.example.com/_s_/dyn/Driver_initialized",
                $this->con->getSid(),
                $this->con->getSid()
            ));
        }

        $this->started = true;
    }
861492
public function inputName($inputName=null){
		if($inputName){
			$this->inputName = $inputName;
		}else{
			return @$this->inputName ?: $this->name();
		}
		
		
	}
1140147
private function getBrowser($browserOption = null)
    {
        if (!empty($browserOption)) {
            list($command, ) = explode(' ', $browserOption, 2);
            if (!$this->shell->commandExists($command)) {
                $this->stdErr->writeln(sprintf('Command not found: <error>%s</error>', $command));
                return false;
            }

            return $browserOption;
        }

        return $this->getDefaultBrowser();
    }
745789
public function getTypeMapping($indexName, $typeName)
    {
        $index = $this->getIndex($indexName);
        $type = $index->getType($typeName);

        return $type->getMapping();
    }
580214
public function mapDeviceMaker(string $deviceMaker, ?string $deviceName = null): ?string
    {
        return (new DeviceMakerMapper())->mapDeviceMaker($deviceMaker, $deviceName);
    }
729144
public function findChildByRouteName($routeName)
    {
        if ($this->hasChildren()) {
            if (array_key_exists($routeName, $this->children)) {
                return $this->children[$routeName];
            }
            /** @var RouteDefinition $definition */
            foreach ($this->children as $definition) {
                if (null !== $child = $definition->findChildByRouteName($routeName)) {
                    return $child;
                }
            }
        }
        return null;
    }
322827
public function mapMaker(?string $maker): ?string
    {
        if (null === $maker) {
            return null;
        }

        switch (mb_strtolower(trim($maker))) {
            case '':
            case 'unknown':
            case 'other':
            case 'bot':
            case 'various':
                $maker = null;
                break;
            case 'microsoft':
            case 'microsoft corporation.':
                $maker = 'Microsoft Corporation';
                break;
            case 'apple':
            case 'apple inc.':
            case 'apple computer, inc.':
                $maker = 'Apple Inc';
                break;
            case 'google':
            case 'google inc.':
            case 'google, inc.':
                $maker = 'Google Inc';
                break;
            case 'lunascape & co., ltd.':
                $maker = 'Lunascape Corporation';
                break;
            case 'opera software asa.':
                $maker = 'Opera Software ASA';
                break;
            case 'sun microsystems, inc.':
                $maker = 'Oracle';
                break;
            case 'postbox, inc.':
                $maker = 'Postbox Inc';
                break;
            case 'comodo group, inc.':
                $maker = 'Comodo Group Inc';
                break;
            case 'canonical ltd.':
                $maker = 'Canonical Ltd';
                break;
            case 'gentoo foundation, inc.':
                $maker = 'Gentoo Foundation Inc';
                break;
            case 'omni development, inc.':
                $maker = 'Omni Development Inc';
                break;
            case 'slackware linux, inc.':
                $maker = 'Slackware Linux Inc';
                break;
            case 'red hat, inc.':
                $maker = 'Red Hat Inc';
                break;
            case 'rim':
                $maker = 'Research In Motion Limited';
                break;
            case 'mozilla':
                $maker = 'Mozilla Foundation';
                break;
            case 'majestic-12':
                $maker = 'Majestic-12 Ltd';
                break;
            case 'zum internet':
                $maker = 'ZUMinternet Corp';
                break;
            case 'mojeek ltd.':
                $maker = 'Linkdex Limited';
                break;
            default:
                // nothing to do here
                break;
        }

        return $maker;
    }
118737
public function getFieldMapping($fieldName)
    {
        if (!isset($this->fieldMappings[$fieldName])) {
            return false;
        }

        return $this->fieldMappings[$fieldName];
    }