Sets Factory.

@param \Elcodi\Component\Core\Factory\Abstracts\AbstractFactory $factory Factory

@return $this Self object
176266
public function setFactory(\Elcodi\Component\Core\Factory\Abstracts\AbstractFactory $factory)
    {
        $this->factory = $factory;

        return $this;
    }
169674
public function makeFactory()
    {
        $this->options['--model'] = $this->ask('Please enter the name of the model to create a factory for');
        $this->options['name'] = ucfirst($this->options['--model'])."Factory";
    }
645562
public function setRequestFactory(HttpRequestFactory $requestFactory = null)
    {
        if (!$requestFactory) {
            $requestFactory = $this->apiDiscoveryProxy->discoverRequestFactory();
        }

        $this->requestFactory = $requestFactory;

        return $this;
    }
1340359
public function setMigrationFactory(FactoryInterface $factory)
    {
        foreach ($this->getRepositories() as $repo) {
            $repo->setMigrationFactory($factory);
        }
    }
42726
public function validator($factory)
    {
        if (method_exists($this, 'sanitize')) {
            $this->merge($this->container->call([$this, 'sanitize']));
        }

        return $factory->make(
            $this->validationData(), $this->container->call([$this, 'rules']),
            $this->messages(), $this->attributes()
        );
    }
717183
public function set(\Nails\Common\Factory\Locale $oLocale = null): self
    {
        $this->oLocale = $oLocale;
        return $this;
    }
11094
protected function injectContextToViewExtensionFactory(IViewExtensionFactory $factory)
    {
        if ($factory instanceof IContextAware) {
            $factory->clearContext();

            if ($this->hasContext()) {
                $factory->setContext($this->getContext());
            }
        }

        if ($factory instanceof IModelAware && $this->modelFactory) {
            $factory->setModelFactory($this->modelFactory);
        }
    }
267152
protected function _setFactory($factory)
    {
        if ($factory !== null && !($factory instanceof FactoryInterface)) {
            throw $this->_createInvalidArgumentException(
                $this->__('Argument is not a valid factory instance'),
                null,
                null,
                $factory
            );
        }
        $this->factory = $factory;
    }
254265
public function setImageFactory($imageFactory)
    {
        if ($imageFactory instanceof Imageoptim || $imageFactory instanceof Optimus) {
            $this->imageFactory = $imageFactory;
        }

        return $this;
    }
399062
@SuppressWarnings("unchecked")
  public void setExpiryFactory(Optional<Factory<? extends Expiry<K, V>>> factory) {
    expiryFactory = (Factory<Expiry<K, V>>) factory.orElse(null);
  }
681018
static function factory()
    {
        if ( self::$factory === false )
        {
            self::$factory = true;
            self::instance()->readINISettings();
            eZImageAnalyzer::readAnalyzerSettingsFromINI();
        }
        return self::instance();
    }
998889
public function addFactory(FactoryInterface $factory, $priority = 10)
    {
        $this->factoryList->insert($factory, $priority);
        return $this;
    }
857005
protected function factory()
    {
        if (empty($this->factory)) {
            $this->config->theme($this->getView()->getTheme());
            $this->factory = new Factory($this->config);
        }

        return $this->factory;
    }
263360
public final Factory registerFactory(Factory factory) {
        if (factory == null) {
            throw new NullPointerException();
        }
        try {
            factoryLock.acquireWrite();
            factories.add(0, factory);
            clearCaches();
        }
        finally {
            factoryLock.releaseWrite();
        }
        notifyChanged();
        return factory;
    }
109959
public function setFactory(array $factories)
    {
        foreach ($factories as $name => $factory) {
            $this->addFactory($name, $factory);
        }

        return $this;
    }
526754
public function setTypeConverterFactory(TypeConverterFactory $factory): self
    {
        $this->converterFactory = $factory;
        $factory->setConnection($this);

        return $this;
    }
251829
public function addClassMatcherFactory(ClassMatcherFactoryInterface $factory)
    {
        $this->classMatcherFactories[$factory->getType()] = $factory;

        if ($factory instanceof AbstractLogicalFactory) {
            $factory->setNamingStrategy($this);
        }

        return $this;
    }