【发布时间】:2012-09-25 05:48:10
【问题描述】:
我是 Zend 框架的新手。我正在开发一个应用程序,通过使用该类(我添加到Zend/Mail/Storage/Imap.php)来搜索 Gmail 收件箱
/**
* 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();
}
我这样称呼它:
$searchresults = $storage->search(array('search_terms'));
但每次我尝试运行它时,它都会显示错误:
PHP 致命错误:在第 655 行调用 /public_html/test06/Zend/Mail/Storage/Imap.php 中未定义的方法 Zend_Mail_Storage_Imap::requestAndResponse()
【问题讨论】:
-
你在修补 ZF 代码库以实现你想要的吗?!
-
是的,我有。实际上,我正在使用来自code.google.com/p/google-mail-oauth2-tools/wiki/PhpSampleCode 的谷歌代码中的 lib xoauth-php-samples 通过 imap 和 oAuth 访问 gmail。
标签: php zend-framework zend-mail