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();
    }
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();
    }
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 ( ) ; }
Retrieve a schema based on Entity Class.

@return Schema
Retrieve a schema based on Entity Class .