private function setOrAddSession(Request $request)
    {
        $containerName = $request->getPost('containerName', 'Default');
        $keysession = $request->getPost('keysession', '');
        $sessionValue = $request->getPost('sessionvalue', '');
        $new = (bool) $request->getPost('new', false);

        $notEmptyValidator = new NotEmpty();
        if ($notEmptyValidator->isValid($keysession) && $notEmptyValidator->isValid($sessionValue)) {
            $success = $this->sessionManager
                            ->sessionSetting($containerName, $keysession, $sessionValue, ['set' => true, 'new' => $new]);

            return ['success' => $success, 'errorMessage' => ''];
        }

        return ['success' => false, 'errorMessage' => 'Value is required and can\'t be empty'];
    }
private function setOrAddSession(Request $request)
    {
        $containerName = $request->getPost('containerName', 'Default');
        $keysession = $request->getPost('keysession', '');
        $sessionValue = $request->getPost('sessionvalue', '');
        $new = (bool) $request->getPost('new', false);

        $notEmptyValidator = new NotEmpty();
        if ($notEmptyValidator->isValid($keysession) && $notEmptyValidator->isValid($sessionValue)) {
            $success = $this->sessionManager
                            ->sessionSetting($containerName, $keysession, $sessionValue, ['set' => true, 'new' => $new]);

            return ['success' => $success, 'errorMessage' => ''];
        }

        return ['success' => false, 'errorMessage' => 'Value is required and can\'t be empty'];
    }
private function setOrAddSession ( Request $ request ) { $ containerName = $ request -> getPost ( 'containerName' , 'Default' ) ; $ keysession = $ request -> getPost ( 'keysession' , '' ) ; $ sessionValue = $ request -> getPost ( 'sessionvalue' , '' ) ; $ new = ( bool ) $ request -> getPost ( 'new' , false ) ; $ notEmptyValidator = new NotEmpty ( ) ; if ( $ notEmptyValidator -> isValid ( $ keysession ) && $ notEmptyValidator -> isValid ( $ sessionValue ) ) { $ success = $ this -> sessionManager -> sessionSetting ( $ containerName , $ keysession , $ sessionValue , [ 'set' => true , 'new' => $ new ] ) ; return [ 'success' => $ success , 'errorMessage' => '' ] ; } return [ 'success' => false , 'errorMessage' => 'Value is required and can\'t be empty' ] ; }
Set or Add Session Data Process.

@param Request $request

@return array
Set or Add Session Data Process .