original_string: 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'];
      }
code: 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'];
      }
code_tokens: 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' ] ; }
docstring: Set or Add Session Data Process.
  
  @param Request $request
  
  @return array
docstring_tokens: Set or Add Session Data Process .