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