original_string: public function findSnippetAutoComplete($data) {
          $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;
          }
          
          
          //Lookup snippets
          $snippets=Snippet::get()->filter('Title:StartsWith', Convert::raw2sql($data->pattern))->limit(20);
          
          
          $response['status']='HELO';
          $response['data']=$this->overviewList($snippets);
          
          return $response;
      }
code: public function findSnippetAutoComplete($data) {
          $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;
          }
          
          
          //Lookup snippets
          $snippets=Snippet::get()->filter('Title:StartsWith', Convert::raw2sql($data->pattern))->limit(20);
          
          
          $response['status']='HELO';
          $response['data']=$this->overviewList($snippets);
          
          return $response;
      }
code_tokens: public function findSnippetAutoComplete ( $ data ) { $ 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 ; } //Lookup snippets $ snippets = Snippet :: get ( ) -> filter ( 'Title:StartsWith' , Convert :: raw2sql ( $ data -> pattern ) ) -> limit ( 20 ) ; $ response [ 'status' ] = 'HELO' ; $ response [ 'data' ] = $ this -> overviewList ( $ snippets ) ; return $ response ; }
docstring: Finds a snippet begining with the data passed
  @param {stdClass} $data Data passed from ActionScript
  @return {array} Standard response base
docstring_tokens: Finds a snippet begining with the data passed