Head method

@param DispatcherContext $context  A dispatcher context object
@return ModelEntityInterface
176420
protected function _actionHead(DispatcherContext $context)
    {
        $controller = $this->getController();

        if($controller instanceof ControllerViewable) {
            $result =  $this->execute('get', $context);
        } else {
            throw new DispatcherExceptionMethodNotAllowed('Method HEAD not allowed');
        }

        return $result;
    }
339345
public function createTraverser (ContextInterface $context)
	{
		$traverser = new PhpParser\NodeTraverser;

		$stack = new ContextStack ($context);
		
		// scope visitors
		$traverser->addVisitor (new NodeVisitors\ClassVisitor ($stack, $context));
		$traverser->addVisitor (new NodeVisitors\InterfaceVisitor ($stack, $context));
		$traverser->addVisitor (new NodeVisitors\MethodVisitor ($stack, $context));
		$traverser->addVisitor (new NodeVisitors\GlobalFunctionVisitor ($stack, $context));
		$traverser->addVisitor (new NodeVisitors\CodeCoverageIgnoreVisitor ($stack, $context));

		// issue visitors
		$traverser->addVisitor (new NodeVisitors\CatchVisitor ($stack, $context));
		$traverser->addVisitor (new NodeVisitors\ExitVisitor ($stack, $context));
		$traverser->addVisitor (new NodeVisitors\GlobalVarVisitor ($stack, $context));
		$traverser->addVisitor (new NodeVisitors\StaticVariableVisitor ($stack, $context));
		$traverser->addVisitor (new NodeVisitors\SuperGlobalVisitor ($stack, $context));
		$traverser->addVisitor (new NodeVisitors\StaticCallVisitor ($stack, $context));
		$traverser->addVisitor (new NodeVisitors\CodeInGlobalSpaceVisitor ($stack, $context));
		$traverser->addVisitor (new NodeVisitors\ErrorSuppressionVisitor ($stack, $context));
		$traverser->addVisitor (new NodeVisitors\NewVisitor ($stack, $context));
		$traverser->addVisitor (new NodeVisitors\IncludeVisitor ($stack, $context));
		$traverser->addVisitor (new NodeVisitors\GlobalFunctionCallVisitor ($stack, $context));
		$traverser->addVisitor (new NodeVisitors\ClassConstantFetchVisitor ($stack, $context));
		$traverser->addVisitor (new NodeVisitors\StaticPropertyFetchVisitor ($stack, $context));

		return $traverser;
	}
166143
public function head($options = null) {
		if ($options !== null) {
			$this->setOptions($options, false, false);
		}
		
		return $this;
	}
778646
public function initializeContext(Context $context)
    {
        if (false === $context instanceof AliceContextInterface) {
            return;
        }

        /* @var AliceContextInterface $context */
        $fixturesBasePath = $this->fixturesBasePath;
        switch (true) {

            case $context instanceof AliceODMContext:
                $fixturesBasePath .= '/ODM';
                break;

            case $context instanceof AliceORMContext:
                $fixturesBasePath .= '/ORM';
                break;

            case $context instanceof AlicePHPCRContext:
                $fixturesBasePath .= '/PHPCR';
                break;
        }

        if (null === $context->getBasePath()) {
            $context->setBasePath($fixturesBasePath);
        }
    }
929213
public function build($incoming, Map $context = null)
    {
        $callable = $this->getDelegateBuilder();

        if (null === $context && $this->provide_fallback_context) {
            // Provide a non-null context so null checks aren't later required
            $context = new Map();
        }

        return $callable($incoming, $context);
    }
109410
protected static function ctxGetContainer(ContextInterface $context): ContainerInterface
    {
        assert(static::ctxHasContainer($context));

        return $context->get(ContextProperties::CTX_CONTAINER);
    }
747486
public function setContext(Context $context)
    {
        $this->context = $context;

        if (empty($this->parameters['secret'])) {
            $this->parameters['secret'] = $context->getSecret();
        }

        return $this;
    }
1171550
protected function _resolveRequest(DispatcherContext $context)
    {
        //Resolve the controller action
        $method = strtolower($context->request->getMethod());

        if (!in_array($method, $this->getHttpMethods())) {
            throw new DispatcherExceptionMethodNotAllowed('Method '.strtoupper($method).' not allowed');
        }

        $this->setControllerAction($method);

        parent::_resolveRequest($context);
    }
157211
protected function _actionAdd($context)
    {
        $entity = parent::_actionAdd($context);

        if ($entity->owner->isSubscribable()) {
            $notification = $this->createNotification(array(
                'name' => 'topic_add',
                'object' => $entity,
                'subscribers' => $entity->owner->subscriberIds->toArray(),
            ))->setType('post', array('new_post' => true));
        }

        return $entity;
    }
64159
static public function instance( KernelAwareContext $context )
    {
        static $instance = null;
        if ( $instance === null )
        {
            $class = get_called_class();
            $instance = new $class();
            $instance->setContext( $context );
        }

        return $instance;
    }
839055
public function fetchEntity(AnCommandContext $context)
    {
        $entity = $this->getBehavior('identifiable')->fetchEntity($context);
        $this->instantiateDataFromSession($context);

        return $entity;
    }
651689
public function proceed(Context $context)
    {
        $context = $this->route($context);
        $context = $this->resolve($context);
        $context = $this->guard($context);
        $context = $this->execute($context);
        $context = $this->render($context);

        return $context;
    }
196062
public function getContext(ControllerContextInterface $context = null)
    {
        $context = new ControllerContextModel(parent::getContext($context));
        return $context;
    }
760365
public static function getInstance(ContextInterface $context)
    {
        return new CreateSourceBackbone(
            MetadataSourceQuestionFactory::getInstance($context),
            MetaDataConfigDAOFactory::getInstance($context),
            $context
        );
    }
1235748
protected function before(Context $context)
    {
        // set context forwarder
        $context->forwarder = $context->forwarder ?: [$this, 'forward'];

        return parent::before($context);
    }
1078319
protected function workOnInstance(Context $context)
    {
        $context = $context->setSerializeNull($this->setSerializeNull);

        // group override?
        if (true === $this->overrideHeaderAllowed &&
            $this->requestStack instanceof RequestStack &&
            $this->requestStack->getCurrentRequest() instanceof Request
        ) {
            $headerValue = $this->requestStack->getCurrentRequest()->headers->get($this->overrideHeaderName);
            if (!is_null($headerValue)) {
                $this->groups = array_map('trim', explode(',', $headerValue));
            }
        }

        $serializerGroups = [GroupsExclusionStrategy::DEFAULT_GROUP];
        if (is_array($this->groups) && !empty($this->groups)) {
            $serializerGroups = array_merge($serializerGroups, $this->groups);
        }

        foreach ($this->exclusionStrategies as $strategy) {
            $context->addExclusionStrategy($strategy);
        }

        return $context->setGroups($serializerGroups);
    }
534991
public function getContext(ControllerContextInterface $context = null)
    {
        $context = new ControllerContext($context);
        $context->setRequest($this->getRequest());
        $context->setResponse($this->getResponse());
        $context->setUser($this->getUser());

        return $context;
    }