InboxSearch
1.0.0
搜索操作員庫。查看Gmail的更多信息:https://support.google.com/mail/answer/7190?hl=en
$ term = ' from:[email protected] forum ' ;
$ factory = new InboxSearchFactory ( $ term );
// return InboxSearchInterface
$ inboxSearch = $ factory -> process ();
$ from = $ inboxSearch -> getFrom (); // [email protected]
$ keyword = $ inboxSearch -> getKeyword (); // array('from' => 'forum')
$ fromKeyword = $ inboxSearch -> getKeywordFor ( InboxSearchInterface :: FILTER_FROM ); // forum 過濾器必須實現FilterInterface 。然後在您的工廠實例中註冊過濾器
$ factory = new InboxSearchFactory ( $ term );
$ myFilterParserFqcn = ' SwmInboxSearchFilterModelMyCustomFilter ' ;
$ factory -> addFilterParser ( $ myFilterParserFqcn );php composer install --dev
bin/atoum -d tests/units