Mongolid\ActiveRecord::instantiateSchemaInFields PHP Method

instantiateSchemaInFields() protected method

Will check if the current value of $fields property is the name of a Schema class and instantiate it if possible.
protected instantiateSchemaInFields ( ) : Schema | null
return Mongolid\Schema\Schema | null
    protected function instantiateSchemaInFields()
    {
        if (is_string($this->fields)) {
            if (is_subclass_of($instance = Ioc::make($this->fields), Schema::class)) {
                return $instance;
            }
        }
    }