2017 © Pedro Peláez
 

standalone inboxsearch

wip

image

scullwm/inboxsearch

wip

  • Friday, September 30, 2016
  • by ScullWM
  • Repository
  • 3 Watchers
  • 10 Stars
  • 1 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 1 Forks
  • 0 Open issues
  • 2 Versions
  • 0 % Grown

The README.md

InboxSearch

Search operators library. See more from Gmail: https://support.google.com/mail/answer/7190?hl=en, (*1)

Supported operators

  • Filename (string)
  • Size (integer - convert string in bytes)
  • Has (string)
  • From (string)
  • To (string)
  • Subject (string)
  • Label (string)
  • Delivered To (string)
  • After (\DateTime)
  • Before (\DateTime)
  • Older (\DateTime)
  • Newer (\DateTime)
  • In (string)

How to use

$term = 'from:thomas@scullwm.com forum';
$factory = new InboxSearchFactory($term);

//  return InboxSearchInterface
$inboxSearch = $factory->process();

$from    = $inboxSearch->getFrom(); // thomas@scullwm.com
$keyword = $inboxSearch->getKeyword(); // array('from' => 'forum')

$fromKeyword = $inboxSearch->getKeywordFor(InboxSearchInterface::FILTER_FROM); // forum

Create your own filter

Filter must implement FilterInterface. Then register the filter in your factory instance, (*2)


$factory = new InboxSearchFactory($term); $myFilterParserFqcn = 'Swm\InboxSearch\FilterModel\MyCustomFilter'; $factory->addFilterParser($myFilterParserFqcn);

Tests

php composer install --dev
bin/atoum -d tests/units

The Versions

30/09 2016

dev-master

9999999-dev http://github.com/ScullWM/InboxSearch

wip

  Sources   Download

MIT

The Requires

  • php >=5.4

 

The Development Requires

by Thomas P

search inbox

29/09 2016

dev-atoum

dev-atoum http://github.com/ScullWM/InboxSearch

wip

  Sources   Download

MIT

The Requires

  • php >=5.4

 

The Development Requires

by Thomas P

search inbox