Present this instance using the provided Presenter class.

@param string $presenter

@return Hemp\Presenter
502022
public function present($presenter = null)
    {
        if (! $presenter) {
            if (! $this->defaultPresenter) {
                throw new \BadMethodCallException('No presenter or default presenter passed to present()');
            }
            $presenter = $this->defaultPresenter;
        }

        $factory = new PresenterFactory();

        return $factory($this, $presenter);
    }
1362026
public function getProvider($provider)
    {
        $name = is_string($provider) ? $provider : get_class($provider);

        return array_first($this->serviceProviders, function ($value) use ($name) {
            return $value instanceof $name;
        });
    }
415537
public function wrap($value = null)
    {
        $exceptionFactory   = new ExceptionFactory($this->presenter);
        $wrappedObject      = new WrappedObject($value, $this->presenter);
        $caller             = new Caller($wrappedObject, $this->example, $this->dispatcher, $exceptionFactory, $this);
        $arrayAccess        = new SubjectWithArrayAccess($caller, $this->presenter, $this->dispatcher);
        $expectationFactory = new ExpectationFactory($this->example, $this->dispatcher, $this->matchers);

        return new Subject(
            $value, $this, $wrappedObject, $caller, $arrayAccess, $expectationFactory
        );
    }
605530
protected function attached($presenter)
	{
		if ($presenter instanceof Presenter) {
			$menu = $this->container->getMenu($this->menuName);
			$menu->setActivePresenter($presenter);
		}

		parent::attached($presenter);
	}
625272
def presenter(self, presenter_name):
		
		if presenter_name in self.__presenters.keys():
			return self.__presenters[presenter_name]
323128
protected function getPresenter()
	{
		if ($this->hasPresenter()) {
			if (!$this->presenterInstance) {
				$this->presenterInstance = new $this->presenter($this);
			}
		} else {
			if (!$this->presenterInstance) {
				$this->presenterInstance = new Presenter($this);
			}
		}
		
		return $this->presenterInstance;
	}
434770
public function create($listener)
    {
        $model = new Fluent([
            'site' => ['name' => \config('app.name', 'Orchestra Platform')],
        ]);

        $form = $this->presenter->form($model);

        return $listener->createSucceed(\compact('form', 'model'));
    }
26900
public function attached($presenter)
	{
		parent::attached($presenter);

		if ($presenter instanceof Nette\Application\UI\Presenter) {
			/**
			 * Get session
			 */
			if ($this->remember_state) {
				$this->grid_session = $presenter->getSession($this->getSessionSectionName());
			}
		}
	}
363667
public function render($value, $presentation)
    {
        if (is_array($value) || $value instanceof \Traversable || $value instanceof Collection) {
            return $this->renderASeriesOfLinks($value, $presentation);
        }

        if ($value instanceof CollectionDescriptor) {
            return $this->renderTypeCollection($value, $presentation);
        }

        return $this->renderLink($value, $presentation);
    }
40744
def create_presenter(self, request, target_route):
		
		presenter_name = target_route.presenter_name()
		if self.presenter_collection().has(presenter_name) is False:
			raise RuntimeError('No such presenter: %s' % presenter_name)
		presenter_class = self.presenter_collection().presenter(presenter_name)
		return self.presenter_factory().instantiate(presenter_class, request, target_route, self)
537807
public function setProvider($provider = null)
    {
        $this->provider = null;

        if (null === ($provider = $this->internalResolveProvider($provider))) {
            $this->provider = $this->providerId = null;
        } else {
            $this->providerId = $provider->id;
            $this->provider = $provider;
        }

        return $this;
    }
479699
public function render(string $presenter = null, bool $specialSidebar = false): string
    {
        $this->resolveItems($this->items);

        if (! is_null($this->view)) {
            return $this->renderView($presenter, $specialSidebar)->render();
        }

        (! $presenter || ! $this->presenterExists($presenter)) || $this->setPresenter($presenter);

        return $this->renderMenu($specialSidebar);
    }
177298
public P getPresenter() {
        if (presenterFactory != null) {
            if (presenter == null && bundle != null)
                presenter = PresenterStorage.INSTANCE.getPresenter(bundle.getString(PRESENTER_ID_KEY));

            if (presenter == null) {
                presenter = presenterFactory.createPresenter();
                PresenterStorage.INSTANCE.add(presenter);
                presenter.create(bundle == null ? null : bundle.getBundle(PRESENTER_KEY));
            }
            bundle = null;
        }
        return presenter;
    }
1071314
public function call($presenter, array $data = [])
    {
        if ($presenter instanceof PresenterInterface) {
            return $this->callPresenter([$presenter, '__invoke'], $data);
        }
        if (is_callable($presenter)) {
            return $this->callPresenter($presenter, $data);
        }
        if ($resolver = $this->builder->getContainer()) {
            return $this->callPresenter($resolver->get($presenter), $data);
        }
        throw new \BadMethodCallException('cannot resolve a presenter.');
    }
966163
public function navigate()
	{
		if ($this->url)
		{
			$this->session->url($this->url);
		}
		else
		{
			$this->session->navigate($this->presenterName, $this->presenterParameters);
		}
		return $this;
	}
430775
public static function forge($presenter, $method = 'view', $auto_filter = null, $view = null)
	{
		// if no custom view is given, make it equal to the presenter name
		is_null($view) and $view = $presenter;

		// strip any extensions from the view name to determine the presenter to load
		$presenter = \Inflector::words_to_upper(str_replace(
			array('/', DS),
			'_',
			strpos($presenter, '.') === false ? $presenter : substr($presenter, 0, -strlen(strrchr($presenter, '.')))
		));

		// determine the presenter namespace from the current request context
		$namespace = \Request::active() ? ucfirst(\Request::active()->module) : '';

		// list of possible presenter classnames, start with the namespaced one
		$classes = array($namespace.'\\'.static::$ns_prefix.$presenter);

		// add the global version if needed
		empty($namespace) or $classes[] = static::$ns_prefix.$presenter;

		/**
		 * Add non prefixed classnames to the list, for BC reasons
		 *
		 * @deprecated 1.6
		 */
		$classes[] = $namespace.'\\'.$presenter;

		// and add the global version of that if needed
		empty($namespace) or $classes[] = $presenter;

		// check if we can find one
		foreach ($classes as $class)
		{
			if (class_exists($class))
			{
				return new $class($method, $auto_filter, $view);
			}
		}

		throw new \OutOfBoundsException('Presenter "'.reset($classes).'" could not be found.');
	}
651655
public function toProvider(string $provider, string $context = '') : self
    {
        $this->untarget = null;
        $this->validate->toProvider($provider);
        $this->bound = (new DependencyFactory)->newProvider(new \ReflectionClass($provider), $context);
        $this->container->add($this);

        return $this;
    }