@return StreamFactoryInterface

@throws Exception\NotFoundException
552983
public static function findStreamFactory()
    {
        try {
            $messageFactory = static::findOneByType(StreamFactoryInterface::class);
        } catch (DiscoveryFailedException $e) {
            throw self::createException('stream factory', $e);
        }

        return static::instantiateClass($messageFactory);
    }
1374897
public function getObjectManager(): ObjectManagerInterface
    {
        if (!isset($this->earlyInstances[ObjectManagerInterface::class])) {
            debug_print_backtrace();
            throw new FlowException('The Object Manager is not available at this stage of the bootstrap run.', 1301120788);
        }
        return $this->earlyInstances[ObjectManagerInterface::class];
    }
555949
public function getModel()
    {
        /* @var StreamInterface $stream */
        if ($stream = $this->streams->find($this->request->get('group'))) {
            return $stream->getEntryModelName();
        }

        return parent::getModel();
    }
1371584
public function getCacheFrontendFactory() {
		if ($this->_cacheFrontendFactory === null) {
			if ($this instanceof LocatorAwareInterface && $this->hasLocator()) {
				$locator   = $this->getLocator();
				$serviceId = $this->getCacheFrontendFactoryServiceId();
				
				if ($locator->has($serviceId)) {
					$this->_cacheFrontendFactory = $locator->get($serviceId);
					return $this->_cacheFrontendFactory;
				}
			}
			
			throw new NoFrontend('Unable to provide the cache frontend\'s factory');
		}
		
		return $this->_cacheFrontendFactory;
	}
334012
public function getStream()
    {
        $this->validateActive();

        if ($this->stream instanceof StreamInterface) {
            return $this->stream;
        }

        return new LazyOpenStream($this->file, 'r+');
    }
209954
public function resolveEntryIdEventFactory()
    {
        $className = $this->getResolveEntryIdEventClassName();

        $r = new ReflectionClass($className);
        $event = $r->newInstance();

        if (!$event instanceof ResolveEntryIdEventInterface) {
            $errMsg = sprintf('ResolveEntryIdEvent not implement %s', ResolveEntryIdEventInterface::class);
            throw new Exception\ResolveEntryIdEventException($errMsg);
        }

        return $event;
    }
980833
public function getBody()
    {
        if (!($this->body instanceof StreamInterface)) {
            $this->body = new Stream(Stream::createResourceTemp());
        }

        return $this->body;
    }
389106
public function templateFactory()
    {
        if (!isset($this->templateFactory)) {
            throw new RuntimeException(sprintf(
                'Template Factory is not defined for [%s]',
                get_class($this)
            ));
        }

        return $this->templateFactory;
    }
1131386
public static function newStream($body = null): StreamInterface
    {
        if ($body instanceof StreamInterface) {
            return $body;
        }

        if (is_resource($body)) {
            return new Stream($body);
        }

        $stream = new Stream(fopen('php://temp', 'w+'));
        ! empty($body) && $stream->write($body);

        return $stream;
    }
429688
public function getDispatcherFactory(ContainerInterface $container): DispatcherFactoryInterface
    {
        $autowired = $container->get('ellipse.dispatcher.autowiring.status');

        if ($autowired) {

            $interfaces = $container->get('ellipse.dispatcher.autowiring.interfaces');

            $container = new ReflectionContainer($container, $interfaces);

        }

        return new DefaultResolver($container);
    }
1289449
public function propertyFactory()
    {
        if (!isset($this->propertyFactory)) {
            throw new RuntimeException(sprintf(
                'Property Factory is not defined for [%s]',
                get_class($this)
            ));
        }

        return $this->propertyFactory;
    }
1227634
public static function getILoggerFactory () {
    static $nop;
    if (null === self::$factory) {
      if (null == $nop) {
        $nop = new NOPLoggerFactory();
      }
      return $nop;
    }
    return self::$factory;
  }
592841
private function getLoader(): LoaderInterface
    {
        if (null !== $this->loader) {
            return $this->loader;
        }

        if (null !== $this->localFile) {
            $this->loader = new Local($this->localFile);

            return $this->loader;
        }

        if (extension_loaded('curl')) {
            $this->loader = new Curl($this);

            return $this->loader;
        }

        $streamHelper = new StreamCreator($this);

        if (ini_get('allow_url_fopen')) {
            $this->loader = new FopenLoader($this, $streamHelper);

            return $this->loader;
        }

        $this->loader = new SocketLoader($this, $streamHelper);

        return $this->loader;
    }
403973
private static function createStream($file = 'php://temp', $mode = 'r+')
    {
        $factory = Middleware::getStreamFactory();
        $replacing = null;

        if ($file instanceof StreamInterface) {
            $replacing = $file;
            $file = 'php://temp';
        }

        if ($factory === null) {
            if (class_exists('Zend\\Diactoros\\Stream')) {
                return new \Zend\Diactoros\Stream($file, $mode);
            }

            throw new \RuntimeException('Unable to create a stream. No stream factory defined');
        }

        return call_user_func($factory, $file, $mode, $replacing);
    }
255690
public static function findUploadedFileFactory()
    {
        try {
            $messageFactory = static::findOneByType(UploadedFileFactoryInterface::class);
        } catch (DiscoveryFailedException $e) {
            throw self::createException('uploaded file factory', $e);
        }

        return static::instantiateClass($messageFactory);
    }
1223647
public static function getFactory()
    {
        if (self::$nb_provider_factory === null) {
            self::$nb_provider_factory = new CNabuProviderFactory();
            self::$nb_provider_factory->init();
        }

        return self::$nb_provider_factory;
    }
774149
protected function getMonologHandler()
    {
        return (new StreamHandler($this->path('storage', 'logs/netforce.log'), Logger::DEBUG))->setFormatter(new LineFormatter(null, null, true, true));
    }