Ejemplo n.º 1
0
 /**
  * @param string $name
  * @return string
  * @throws \OutOfBoundsException
  */
 public function getClassByEventName(string $name)
 {
     if (!$this->innerMap->containsKey($name)) {
         throw new \OutOfBoundsException("Event class not mapped: '{$name}'.");
     }
     return $this->innerMap->get($name)->get();
 }
Ejemplo n.º 2
0
 /**
  * Does the map contain a dependency of the specified name?
  *
  * @param string $dependencyName
  *
  * @return bool
  */
 public function has($dependencyName)
 {
     return $this->map->containsKey($dependencyName);
 }
Ejemplo n.º 3
0
 public function containsKey($key)
 {
     return isset($this->serviceIds[$key]) || parent::containsKey($key);
 }
Ejemplo n.º 4
0
 public function testContainsKey()
 {
     $this->assertTrue($this->map->containsKey('foo'));
     $this->assertFalse($this->map->containsKey('boo'));
 }