Webiny\Component\Entity\Entity::add PHP 메소드

add() 공개 메소드

Add instance to the pool
public add ( $instance ) : mixed
$instance
리턴 mixed
    public function add($instance)
    {
        $class = get_class($instance);
        $entityPool = $this->pool->key($class, $this->arr(), true);
        $entityPool->key($instance->id, $instance);
        return $instance;
    }