/**
  * Inject values into the context
  *
  * The provider is expected to use the ->set() interface on the context object to
  * provide information.
  *
  * @param ContextInterface $context
  * @return mixed
  */
 public function inject(ContextInterface $context)
 {
     $context->set('session_id', sha1($this->session->getId() . __CLASS__));
 }
Example #2
0
 /**
  * We assume pack format specifier 'I' is equal in size to PHP_INT_SIZE
  *
  * @param ContextInterface $context
  */
 public function context(ContextInterface $context)
 {
     if (!empty($this->vary)) {
         $this->varyValue = $context->get($this->vary);
     }
 }