construct a new Store object configured for enforcement

@param $model
@return Store
488897
public function getNewStore(\PhalconRest\API\BaseModel $model): \PhalconRest\Rules\Store
    {
        $newStore = new \PhalconRest\Rules\Store($model);
        //force store to match registry enforcement setting
        if ($this->enforceRules) {
            $newStore->enable();
        } else {
            $newStore->disable();
        }
        return $newStore;
    }
1111332
public function associate($model)
    {
        $this->associatedModel = is_string($model) ? $model : get_class($model);
        
        return $this;
    }
866723
public function push(Model $model)
    {
        $this->models[$model->getType()][$model->getId()] = $model;
        return $this;
    }
712369
public function isPendingOrSaved($model)
    {
        return $this->store->isSaved($model) || $this->store->isPending($model);
    }
786469
protected function prepareDataProvider($model)
    {
        $query = $this->getQuery($model);

        if ($model instanceof ActiveSearchInterface) {
            return $model->search($query);
        }

        return new ActiveDataProvider([
            'query' => $query,
            'pagination' => [],
        ]);
    }
887057
public function create(ModelInterface $model)
    {
        $user = $this->container->make(UserSingularity::class);

        $user
            ->setModel($model)
            ->boot();

        return $user;
    }
93386
public function create(Model $model) : Model
    {
        return $model->load(['attachment', 'tags', 'taxonomies'])
            ->setAttribute('category', $model->taxonomies->map(function ($item) {
                return $item->id;
            })->toArray());
    }
3335
private function doCommitCreate(Model $model)
    {
        $this->dispatchLifecycleEvent(Events::preCreate, $model);

        $this->getPersisterFor($model->getType())->create($model);
        $model->getState()->setNew(false);
        // Should the model always reload? Or should the commit be assumed correct and just clear the new/dirty state?
        $model->reload();

        $this->dispatchLifecycleEvent(Events::postCreate, $model);
        return $model;
    }
53248
public static function with($model)
    {
        $data = static::model()->findAll();

        $idKey = null;
        $whereIn = [];
        foreach ($data as $key => $value) {
            $idKey = $value->primaryKey;
            $whereIn[] = $value->{$value->primaryKey};
        }

        $associatedModel = new $model();
        $associatedData = $associatedModel
            ->where(static::getForeignKey(static::model()->tableName), 'IN', implode(',', $whereIn))
            ->findAll();

        $data = static::buildRelations($data, $associatedModel, $associatedData);

        return $data;
    }
192761
public function create(Model $model)
    {
        $data['model'] = $this->createModelData($model);

        $modelResult = $this->getRequest()->request(
            'POST',
            $this->getRequestUrl('models'),
            $data
        );

        return $this->getModelFromResult($modelResult);
    }
719215
protected function getModelInstanceQuery(Model $model)
    {
        $query = $model->query();

        $this->applyOrderingToModelInstanceQuery($query);
        $this->applyStartAndStopLimitsToQuery($query);

        return $query;
    }
764250
public function creating(Model $model)
    {
        $count = method_exists($model, 'getCounter') ? $model->getCounter() : ($model::count() ?? 0);

        $column = method_exists($model, 'getReferenceColumn') ? $model->getReferenceColumn() : 'reference';

        $prefix = method_exists($model, 'referencePrefix') ? $model->referencePrefix() : config('document.prefix');

        if (Schema::hasColumn($model->getTable(), $column) && is_null($model->$column)) {
            $model->$column = generate_reference($prefix, $count);
        }
    }
793222
public function getModel($model)
    {
        /* Get the namespace */
        $ns = $this->getAppNamespace();
        if ($ns) {
            /* Try laravel default convention (models in the app folder). */
            $qm = $ns . $model;
            if (class_exists($qm)) {
                return new $qm;
            }
            /* Try secondary convention of having a models directory. */
            $qm = $ns . 'Models' . '\\' . $model;
            if (class_exists($qm)) {
                return new $qm;
            }
        }
        return false;
    }
306243
public function model($model)
    {
        #$model = ucfirst($model).'Model';
        $modelPath = self::$instance->app->findModel($model);
        $modelClass = "App\\Model\\".$model;
        $this->model = new $modelClass();
        self::$instance->modelService = new ModelService();
        self::$instance->modelService->initialize(self::$instance->app);
        return $this->model;
        //$appModel->handleModel($controller, $method);
    }
155780
public static function createForModel(\Parable\ORM\Model $model)
    {
        $repository = \Parable\DI\Container::create(static::class);
        $repository->setModel($model);
        return $repository;
    }
926451
static function factory($model, $id = null) {
        if (is_string($model)) {
            $model_class = $model;
            if($model_class::isSoftDelete()){
                $model       = $model_class::withTrashed()->find($id);
            } else {
                $model       = $model_class::find($id);
            }
        }
        else {
            $model_class = get_class($model);
        }
        $acl_class = str_replace('\Model\\', '\Acl\Acl', \Str::studly($model_class));
        if (!class_exists($acl_class)) {
            $acl_class = __CLASS__;
        }
        return new $acl_class($model);
    }
19457
public function insertFrom($model)
	{
		$db = $this->getDb();
		$myCols = array_keys( $this->schemaColumnsGet() );
		$theirCols = $model->getColumnAliases();
		$columns = '('.implode( ',', array_map_val( array_intersect( $theirCols, $myCols ), $this->quoteColumnDg() ) ).')';
		$table = $this->quoteTable();
		$db->exec('INSERT INTO '.$table.' '.$columns.' '.$model->getSQL());
		$this->id = $this->getLastInsertId();
		if( $this->recordExists() )
		{
			return $this->filterById($this->id)->loadOne();
		}
		else
		{
			return $this;
		}
	}