Mongolid\Cursor\EmbeddedCursor::getSchemaForEntity PHP 메소드

getSchemaForEntity() 보호된 메소드

Retrieve a schema based on Entity Class.
protected getSchemaForEntity ( ) : Schema
리턴 Mongolid\Schema\Schema
    protected function getSchemaForEntity() : Schema
    {
        if ($this->entityClass instanceof Schema) {
            return $this->entityClass;
        }
        $model = new $this->entityClass();
        if ($model instanceof ActiveRecord) {
            return $model->getSchema();
        }
        return new DynamicSchema();
    }