original_string: public function getSnippets() {
          $response=CodeBank_ClientAPI::responseBase();
          
          //Ensure logged in
          if(!Permission::check('CODE_BANK_ACCESS')) {
              $response['status']='EROR';
              $response['message']=_t('CodeBankAPI.PERMISSION_DENINED', '_Permission Denied');
              
              return $response;
          }
          
          
          $languages=SnippetLanguage::get();
          foreach($languages as $lang) {
              if($lang->Snippets()->Count()>0) {
                  $snippets=$this->overviewList($lang->Snippets()->filter('FolderID', 0), 'Title', 'ID', 'LanguageID');
                  
                  $response['data'][]=array(
                                          'id'=>$lang->ID,
                                          'language'=>$lang->Name,
                                          'folders'=>$this->mapFolders($lang->Folders()),
                                          'snippets'=>$snippets
                                      );
              }
          }
          
          
          return $response;
      }
code: public function getSnippets() {
          $response=CodeBank_ClientAPI::responseBase();
          
          //Ensure logged in
          if(!Permission::check('CODE_BANK_ACCESS')) {
              $response['status']='EROR';
              $response['message']=_t('CodeBankAPI.PERMISSION_DENINED', '_Permission Denied');
              
              return $response;
          }
          
          
          $languages=SnippetLanguage::get();
          foreach($languages as $lang) {
              if($lang->Snippets()->Count()>0) {
                  $snippets=$this->overviewList($lang->Snippets()->filter('FolderID', 0), 'Title', 'ID', 'LanguageID');
                  
                  $response['data'][]=array(
                                          'id'=>$lang->ID,
                                          'language'=>$lang->Name,
                                          'folders'=>$this->mapFolders($lang->Folders()),
                                          'snippets'=>$snippets
                                      );
              }
          }
          
          
          return $response;
      }
code_tokens: public function getSnippets ( ) { $ response = CodeBank_ClientAPI :: responseBase ( ) ; //Ensure logged in if ( ! Permission :: check ( 'CODE_BANK_ACCESS' ) ) { $ response [ 'status' ] = 'EROR' ; $ response [ 'message' ] = _t ( 'CodeBankAPI.PERMISSION_DENINED' , '_Permission Denied' ) ; return $ response ; } $ languages = SnippetLanguage :: get ( ) ; foreach ( $ languages as $ lang ) { if ( $ lang -> Snippets ( ) -> Count ( ) > 0 ) { $ snippets = $ this -> overviewList ( $ lang -> Snippets ( ) -> filter ( 'FolderID' , 0 ) , 'Title' , 'ID' , 'LanguageID' ) ; $ response [ 'data' ] [ ] = array ( 'id' => $ lang -> ID , 'language' => $ lang -> Name , 'folders' => $ this -> mapFolders ( $ lang -> Folders ( ) ) , 'snippets' => $ snippets ) ; } } return $ response ; }
docstring: Gets a list of snippets in an array of languages
  @return {array} Standard response base
docstring_tokens: Gets a list of snippets in an array of languages