2012-10-04 2 views
0

Zend Framework를 처음 사용합니다. 나는PHP 오류 발생 : 정의되지 않은 메소드 호출 Zend_Mail_Storage_Imap :: requestAndResponse()

/** 
* do a search request 
* 
* This method is currently marked as internal as the API might change and is not 
* safe if you don't take precautions. 
* 
* @internal 
* @return array message ids 
*/ 
public function search(array $params) 
{ 
    $response = $this->requestAndResponse('SEARCH', $params); 
    if (!$response) { 
     return $response; 
    } 

    foreach ($response as $ids) { 
     if ($ids[0] == 'SEARCH') { 
      array_shift($ids); 
      return $ids; 
     } 
    } 
    return array(); 
} 

(내가 Zend/Mail/Storage/Imap.php에 추가) 클래스를 사용하여 Gmail받은 편지함을 검색 할 응용 프로그램 일하고 그리고 나는 이런 식으로 호출 오전 :

$searchresults = $storage->search(array('search_terms')); 

을하지만 매번 내가 실행하려고 그것은 오류를 보여줍니다 :

PHP Fatal error: Call to undefined method Zend_Mail_Storage_Imap::requestAndResponse() in /public_html/test06/Zend/Mail/Storage/Imap.php on line 655

+1

원하는 것을 얻기 위해 ZF 코드베이스를 패치하고 있습니까?! – Florent

+0

예. 있습니다. 사실 저는 http://code.google.com/p/google-mail-oauth2-tools/wiki/PhpSampleCode에서 Google 코드의 lib xoauth-php-samples를 사용하여 imap 및 oAuth를 통해 Gmail에 액세스합니다. – user1719367

답변

0

그것은 당신이 그것을 부르는 방식으로 정의되지 않은 것 같습니다. 나는 ZF를 사용하지 않지만, requestAndResponse가 당신이 보내는 2 개의 param을 받아 들일 것인지 확신합니까? 내 말은 ('SEARCH', $ params).

관련 문제