Push given context over the stack, making it the current one.

@param RenderingContext $context

@return self

@throws BadMethodCallException If stack is full
964026
public function push(RenderingContext $context)
    {
        if ($this->getLevel() == self::COMPONENT) {
            throw new \BadMethodCallException(
                'Cannot push another context : stack is full. Resolve or flush current one first'
            );
        }

        array_unshift($this->stack, $context);

        return $this;
    }
920660
public function render($context)
    {
        if (count($this->attr) > 0) {
            foreach ($this->attr as $name => $value) {
                $this->getCell()->addVarAttr($name, $value);
            }
        }
        return $context;
    }
845774
protected function _render(AnCommandContext $context)
    {
        dispatch_plugin('system.onBeforeRender', array( $context ));

        $config = array(
            'request' => $context->request,
            'response' => $context->response,
            'theme' => $this->_application->getTemplate(),
        );

        $layout = $this->_request->get('tmpl', 'default');

        $this->getService('com:application.controller.default', $config)
             ->layout($layout)
             ->render();

        dispatch_plugin('system.onAfterRender', array( $context ));
    }
777293
public function render($context)
    {
        return (isset($this->options[$context])) ? $this->options[$context] :    $context;
    }
993480
protected function setContext($context = null)
    {
        if ($context) {
            $this->context = new LogContext($this->parser, $context);
        }
    }
381500
public function pushContext($key, $context)
    {
        $newContext = $this->getCurrentContext();
        $newContext[$key] = $context;
        $this->contextStack[] = $newContext;
    }
1188023
public function setContext($context)
    {
        if (!is_array($context) && !$context instanceof \ArrayObject && !$context instanceof \Iterator) {
            throw new EventException('Unexpected value type for context', EventException::INVALID_CONTEXT);
        }

        $context = Collection::cast($context);

        $this->context = $context;

        return $this;
    }
1187162
protected function before(Context $context)
    {
        // kernel before handler
        $context = parent::before($context);

        // add templater to context
        $context->templater = $this->templater;

        // prepare templater helpers and globals vars
        $this->templater->vars['ctx'] = $context;
        $this->templater->helpers['url'] = [$context, 'url'];
        $this->templater->helpers['call'] = [$context, 'forward'];

        return $context;
    }
350127
public function evaluate(RenderingContextInterface $renderingContext)
    {
        $arrayToBuild = array();
        foreach ($this->internalArray as $key => $value) {
            if ($value instanceof AbstractNode) {
                $arrayToBuild[$key] = $value->evaluate($renderingContext);
            } else {
                // TODO - this case should not happen!
                $arrayToBuild[$key] = $value;
            }
        }
        return $arrayToBuild;
    }
1371573
public static void pushContext() {
        RpcInternalContext context = LOCAL.get();
        if (context != null) {
            Deque<RpcInternalContext> deque = DEQUE_LOCAL.get();
            if (deque == null) {
                deque = new ArrayDeque<RpcInternalContext>();
                DEQUE_LOCAL.set(deque);
            }
            deque.push(context);
            LOCAL.set(null);
        }
    }
147500
public static Context pushContext(Map<String, Object> current) {
        Context context = new Context(getContext(), current);
        LOCAL.set(context);
        return context;
    }
373419
public function render($context)
    {
        if (count($this->class) > 0 && is_array($this->class)) {
            foreach ($this->class as $class) {
                $this->getCell()->addClass($class);
            }
        }
        return $context;
    }
71075
public function addContexts($contexts)
    {
        if (is_array($contexts)) {
            foreach ($contexts as $context) {
                $this->insertContextInAllowedExtensions($context);
            }
        } elseif ($contexts !== false) {
            $this->insertContextInAllowedExtensions($contexts);
        }

        return $this;
    }
1002336
public function render($context = null)
    {
        try {
            return $this->_render($context);
        } catch (InvalidArgumentException $e) {
            throw $e;
        } catch (RootException $e) {
            throw $this->_createTemplateRenderException($this->__('Could not render placeholder template'), null, $e, $this, $context);
        }
    }
653408
public function render(array $context = [])
    {
        $this->context()->addContext($context);
        $context = $this->context()->get();

        return $this->twig->render($context);
    }
371286
public function apply( $context ) {
		if ( ! $context instanceof RContext ) {
			$context = new Context( $context );
		}

		return $this->evaluate( $context );
	}
998761
public function loadContext($context)
    {

        $now = time();
        $context->created = $now;
        $context->updated = $now;

        return true;

    }