protected function ascertainMetadata(string $handlerName, ?string $httpMethod = null): void
	{
		if (empty($this->handlerClassNames[$handlerName]))
		{
			try
			{
				$this->loadMetadata($handlerName);
				$this->needCacheUpdate = true;
			}
			catch (\Throwable $e)
			{
				//Reset all metadata
				[
					$this->handlerClassNames,
					$this->routes,
					$this->handlerMethodNames,
					$this->consumers,
					$this->attributes,
					$this->producers
				] = [[], [], [], [], [], []];
				throw $e;
			}
		}

		if (($httpMethod !== null) && empty($this->handlerMethodNames[$this->handlerClassNames[$handlerName]][$httpMethod]))
		{
			throw new \InvalidArgumentException(\sprintf(
				'Handler %s is not configured to handle %s-method.', $handlerName, $httpMethod
			));
		}
	}
protected function ascertainMetadata(string $handlerName, ?string $httpMethod = null): void
	{
		if (empty($this->handlerClassNames[$handlerName]))
		{
			try
			{
				$this->loadMetadata($handlerName);
				$this->needCacheUpdate = true;
			}
			catch (\Throwable $e)
			{
				//Reset all metadata
				[
					$this->handlerClassNames,
					$this->routes,
					$this->handlerMethodNames,
					$this->consumers,
					$this->attributes,
					$this->producers
				] = [[], [], [], [], [], []];
				throw $e;
			}
		}

		if (($httpMethod !== null) && empty($this->handlerMethodNames[$this->handlerClassNames[$handlerName]][$httpMethod]))
		{
			throw new \InvalidArgumentException(\sprintf(
				'Handler %s is not configured to handle %s-method.', $handlerName, $httpMethod
			));
		}
	}
protected function ascertainMetadata ( string $ handlerName , ? string $ httpMethod = null ) : void { if ( empty ( $ this -> handlerClassNames [ $ handlerName ] ) ) { try { $ this -> loadMetadata ( $ handlerName ) ; $ this -> needCacheUpdate = true ; } catch ( \ Throwable $ e ) { //Reset all metadata [ $ this -> handlerClassNames , $ this -> routes , $ this -> handlerMethodNames , $ this -> consumers , $ this -> attributes , $ this -> producers ] = [ [ ] , [ ] , [ ] , [ ] , [ ] , [ ] ] ; throw $ e ; } } if ( ( $ httpMethod !== null ) && empty ( $ this -> handlerMethodNames [ $ this -> handlerClassNames [ $ handlerName ] ] [ $ httpMethod ] ) ) { throw new \ InvalidArgumentException ( \ sprintf ( 'Handler %s is not configured to handle %s-method.' , $ handlerName , $ httpMethod ) ) ; } }
Ensures that metadata for specified handler name was loaded
and optionally checks if this metadata contains information about specified HTTP method
@param string $handlerName
@param string|null $httpMethod
@throws \Doctrine\Common\Annotations\AnnotationException
@throws \ReflectionException
Ensures that metadata for specified handler name was loaded and optionally checks if this metadata contains information about specified HTTP method