Util: EntityStreams now accepts FQCNs if they're prefixed with \

This commit is contained in:
Alma Armas 2021-01-27 18:01:18 +00:00
parent 0bdca7a0ff
commit 0c80f1f041

View file

@ -10,7 +10,7 @@ class EntityStream implements \IteratorAggregate
function __construct(string $class, \Traversable $dbStream) function __construct(string $class, \Traversable $dbStream)
{ {
$this->dbStream = $dbStream; $this->dbStream = $dbStream;
$this->entityClass = "openvk\\Web\\Models\\Entities\\$class"; $this->entityClass = $class[0] === "\\" ? $class : "openvk\\Web\\Models\\Entities\\$class";
} }
/** /**