src/Mpociot/Reflection/DocBlock/Tag.php
final public static function registerTagHandler($tag, $handler)
    {
        $tag = trim((string)$tag);

        if (null === $handler) {
            unset(self::$tagHandlerMappings[$tag]);
            return true;
        }

        if ('' !== $tag
            && class_exists($handler, true)
            && is_subclass_of($handler, __CLASS__)
            && !strpos($tag, '\\') //Accept no slash, and 1st slash at offset 0.
        ) {
            self::$tagHandlerMappings[$tag] = $handler;
            return true;
        }

        return false;
    }
final public static function registerTagHandler($tag, $handler)
    {
        $tag = trim((string)$tag);

        if (null === $handler) {
            unset(self::$tagHandlerMappings[$tag]);
            return true;
        }

        if ('' !== $tag
            && class_exists($handler, true)
            && is_subclass_of($handler, __CLASS__)
            && !strpos($tag, '\\') //Accept no slash, and 1st slash at offset 0.
        ) {
            self::$tagHandlerMappings[$tag] = $handler;
            return true;
        }

        return false;
    }
final public static function registerTagHandler ( $ tag , $ handler ) { $ tag = trim ( ( string ) $ tag ) ; if ( null === $ handler ) { unset ( self :: $ tagHandlerMappings [ $ tag ] ) ; return true ; } if ( '' !== $ tag && class_exists ( $ handler , true ) && is_subclass_of ( $ handler , __CLASS__ ) && ! strpos ( $ tag , '\\' ) //Accept no slash, and 1st slash at offset 0. ) { self :: $ tagHandlerMappings [ $ tag ] = $ handler ; return true ; } return false ; }
Registers a handler for tags.

Registers a handler for tags. The class specified is autoloaded if it's
not available. It must inherit from this class.

@param string      $tag     Name of tag to regiser a handler for. When
registering a namespaced tag, the full name, along with a prefixing
slash MUST be provided.
@param string|null $handler FQCN of handler. Specifing NULL removes the
handler for the specified tag, if any.

@return bool TRUE on success, FALSE on failure.
Registers a handler for tags .