<?php

namespace common\logic\Feature\FeatureProducer;

use common\logic\AbstractRepositoryQuery;
use common\logic\Feature\Feature\Feature;

class FeatureProducerRepositoryQuery extends AbstractRepositoryQuery
{
    protected FeatureProducerDefinition $definition;

    public function loadDependencies(): void
    {
        $this->loadDefinition(FeatureProducerDefinition::class);
    }

    public function filterByFeature(Feature $feature): self
    {
        $this->andWhere(['id_feature' => $feature->id]);
        return $this;
    }
}