public function addKeyword($keyword, $typeClassName)
    {
        if (!class_exists($typeClassName)) {
            throw new \InvalidArgumentException(
                'The Value Object that needs to be created with a keyword "' . $keyword . '" must be an existing class'
                . ' but we could not find the class ' . $typeClassName
            );
        }

        if (!in_array(Type::class, class_implements($typeClassName), true)) {
            throw new \InvalidArgumentException(
                'The class "' . $typeClassName . '" must implement the interface "phpDocumentor\Reflection\Type"'
            );
        }

        $this->keywords[$keyword] = $typeClassName;
    }
public function addKeyword($keyword, $typeClassName)
    {
        if (!class_exists($typeClassName)) {
            throw new \InvalidArgumentException(
                'The Value Object that needs to be created with a keyword "' . $keyword . '" must be an existing class'
                . ' but we could not find the class ' . $typeClassName
            );
        }

        if (!in_array(Type::class, class_implements($typeClassName), true)) {
            throw new \InvalidArgumentException(
                'The class "' . $typeClassName . '" must implement the interface "phpDocumentor\Reflection\Type"'
            );
        }

        $this->keywords[$keyword] = $typeClassName;
    }
public function addKeyword ( $ keyword , $ typeClassName ) { if ( ! class_exists ( $ typeClassName ) ) { throw new \ InvalidArgumentException ( 'The Value Object that needs to be created with a keyword "' . $ keyword . '" must be an existing class' . ' but we could not find the class ' . $ typeClassName ) ; } if ( ! in_array ( Type :: class , class_implements ( $ typeClassName ) , true ) ) { throw new \ InvalidArgumentException ( 'The class "' . $ typeClassName . '" must implement the interface "phpDocumentor\Reflection\Type"' ) ; } $ this -> keywords [ $ keyword ] = $ typeClassName ; }
Adds a keyword to the list of Keywords and associates it with a specific Value Object.

@param string $keyword
@param string $typeClassName
Adds a keyword to the list of Keywords and associates it with a specific Value Object .