public function setContext(array $context)
    {
        $context = array_merge($this->getDefaultContext(), $context);

        // Always save to property in service for fallback
        $this->context = $context;

        // Try to save the context in session,
        if ($this->session) {
            $this->session->set(static::SESSION_KEY, $context);
            $this->session->save();
        }
    }
public function setContext(array $context)
    {
        $context = array_merge($this->getDefaultContext(), $context);

        // Always save to property in service for fallback
        $this->context = $context;

        // Try to save the context in session,
        if ($this->session) {
            $this->session->set(static::SESSION_KEY, $context);
            $this->session->save();
        }
    }
public function setContext ( array $ context ) { $ context = array_merge ( $ this -> getDefaultContext ( ) , $ context ) ; // Always save to property in service for fallback $ this -> context = $ context ; // Try to save the context in session, if ( $ this -> session ) { $ this -> session -> set ( static :: SESSION_KEY , $ context ) ; $ this -> session -> save ( ) ; } }
This method is exposed only for command-line applications, please use the context selector form

@param array $context

@internal Warning, this method will save the context without any checks on the values
This method is exposed only for command - line applications please use the context selector form