This commit is contained in:
2020-09-01 03:44:49 +08:00
parent 7b8e7f74f4
commit dbfe5e04a8
+4
View File
@@ -4,6 +4,7 @@
namespace Snowflake\Annotation; namespace Snowflake\Annotation;
use Exception; use Exception;
use HttpServer\Route\Annotation\Websocket;
use ReflectionClass; use ReflectionClass;
use ReflectionException; use ReflectionException;
use ReflectionMethod; use ReflectionMethod;
@@ -42,8 +43,11 @@ class Annotation extends BaseAnnotation
*/ */
public function register($name, $class) public function register($name, $class)
{ {
if (!isset($this->_classMap[$name]) && is_string($this->_classMap[$name])) {
$this->_classMap[$name] = Snowflake::createObject($class); $this->_classMap[$name] = Snowflake::createObject($class);
} }
return $this->_classMap[$name];
}
/** /**