diff --git a/composer.json b/composer.json
new file mode 100644
index 0000000..f51f362
--- /dev/null
+++ b/composer.json
@@ -0,0 +1,41 @@
+{
+ "name": "zbateson/mailbox-folder",
+ "description": "Lists and displays email messages stored on a local folder",
+ "keywords": ["email", "inbox", "folder", "mailbox"],
+ "license": "BSD-3-Clause",
+ "authors": [
+ {
+ "name": "Zaahid Bateson",
+ "email": "zbateson@users.noreply.github.com"
+ }
+ ],
+ "require": {
+ "aura/web-kernel": "~2.1.0",
+ "monolog/monolog": "~1.0",
+ "aura/view": "~2.1.0",
+ "aura/html": "~2.4.0",
+ "zbateson/mail-mime-parser": "~0.3.0"
+ },
+ "autoload": {
+ "psr-4": {
+ "ZBateson\\MailboxFolder\\": "src/",
+ "Aura\\Web_Project\\_Config\\": "config/"
+ }
+ },
+ "extra": {
+ "aura": {
+ "type": "project",
+ "config": {
+ "common": "Aura\\Web_Project\\_Config\\Common",
+ "dev": "Aura\\Web_Project\\_Config\\Dev",
+ "test": "Aura\\Web_Project\\_Config\\Test",
+ "prod": "Aura\\Web_Project\\_Config\\Prod"
+ }
+ }
+ },
+ "autoload-dev": {
+ "psr-4": {
+ "Aura\\Web_Project\\": "tests/"
+ }
+ }
+}
diff --git a/composer.lock b/composer.lock
new file mode 100644
index 0000000..fc3add6
--- /dev/null
+++ b/composer.lock
@@ -0,0 +1,632 @@
+{
+ "_readme": [
+ "This file locks the dependencies of your project to a known state",
+ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file",
+ "This file is @generated automatically"
+ ],
+ "hash": "7e5bc18c4dcba8bd6d87fe15ef8bc8dd",
+ "content-hash": "f345bda346e7dbe9b4c15819cd00231c",
+ "packages": [
+ {
+ "name": "aura/di",
+ "version": "2.2.4",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/auraphp/Aura.Di.git",
+ "reference": "81d5d9c602ca292a16e32001dcbd2adab5350e28"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/auraphp/Aura.Di/zipball/81d5d9c602ca292a16e32001dcbd2adab5350e28",
+ "reference": "81d5d9c602ca292a16e32001dcbd2adab5350e28",
+ "shasum": ""
+ },
+ "require": {
+ "php": ">=5.3.0"
+ },
+ "type": "library",
+ "extra": {
+ "aura": {
+ "type": "library"
+ }
+ },
+ "autoload": {
+ "psr-4": {
+ "Aura\\Di\\": "src/"
+ }
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "BSD-2-Clause"
+ ],
+ "authors": [
+ {
+ "name": "Aura.Di Contributors",
+ "homepage": "https://github.com/auraphp/Aura.Di/contributors"
+ }
+ ],
+ "description": "Provides a dependency injection container system with native support for constructor- and setter-based injection, lazy-loading of services, and inheritable configuration of setters and constructor params.",
+ "homepage": "https://github.com/auraphp/Aura.Di",
+ "keywords": [
+ "container",
+ "dependency injection",
+ "dependency injection container",
+ "di",
+ "di container"
+ ],
+ "time": "2016-01-21 09:34:53"
+ },
+ {
+ "name": "aura/dispatcher",
+ "version": "2.0.4",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/auraphp/Aura.Dispatcher.git",
+ "reference": "d84a58d00788220077b7281f293f748470eabec5"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/auraphp/Aura.Dispatcher/zipball/d84a58d00788220077b7281f293f748470eabec5",
+ "reference": "d84a58d00788220077b7281f293f748470eabec5",
+ "shasum": ""
+ },
+ "require": {
+ "php": ">=5.4.0"
+ },
+ "type": "library",
+ "extra": {
+ "aura": {
+ "type": "library"
+ }
+ },
+ "autoload": {
+ "psr-4": {
+ "Aura\\Dispatcher\\": "src/"
+ }
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "BSD-2-Clause"
+ ],
+ "authors": [
+ {
+ "name": "Aura.Dispatcher Contributors",
+ "homepage": "https://github.com/auraphp/Aura.Dispatcher/contributors"
+ }
+ ],
+ "description": "Creates objects from a factory and invokes methods using named parameters; also provides a trait for invoking closures and object methods with named parameters.",
+ "homepage": "https://github.com/auraphp/Aura.Dispatcher",
+ "keywords": [
+ "controller",
+ "dispatcher",
+ "factory"
+ ],
+ "time": "2016-10-03 19:45:52"
+ },
+ {
+ "name": "aura/html",
+ "version": "2.4.1",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/auraphp/Aura.Html.git",
+ "reference": "7f575f35765af41091b85b23a92b168ae0c5765f"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/auraphp/Aura.Html/zipball/7f575f35765af41091b85b23a92b168ae0c5765f",
+ "reference": "7f575f35765af41091b85b23a92b168ae0c5765f",
+ "shasum": ""
+ },
+ "require": {
+ "php": ">=5.3.0"
+ },
+ "require-dev": {
+ "aura/di": "~2.0"
+ },
+ "type": "library",
+ "extra": {
+ "aura": {
+ "type": "library",
+ "config": {
+ "common": "Aura\\Html\\_Config\\Common"
+ }
+ },
+ "branch-alias": {
+ "dev-develop-2": "2.1.x-dev"
+ }
+ },
+ "autoload": {
+ "psr-4": {
+ "Aura\\Html\\": "src/",
+ "Aura\\Html\\_Config\\": "config/"
+ }
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "BSD-2-Clause"
+ ],
+ "authors": [
+ {
+ "name": "Aura.Html Contributors",
+ "homepage": "https://github.com/auraphp/Aura.Html/contributors"
+ }
+ ],
+ "description": "Provides HTML escapers and helpers, including form input helpers.",
+ "homepage": "https://github.com/auraphp/Aura.Html",
+ "keywords": [
+ "Escape",
+ "escaper",
+ "escapers",
+ "escaping",
+ "form",
+ "helper",
+ "helpers",
+ "html",
+ "input"
+ ],
+ "time": "2015-03-27 17:31:31"
+ },
+ {
+ "name": "aura/project-kernel",
+ "version": "2.1.1",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/auraphp/Aura.Project_Kernel.git",
+ "reference": "644475dbb4859c24aeeb309fd76a9c3e644ba9be"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/auraphp/Aura.Project_Kernel/zipball/644475dbb4859c24aeeb309fd76a9c3e644ba9be",
+ "reference": "644475dbb4859c24aeeb309fd76a9c3e644ba9be",
+ "shasum": ""
+ },
+ "require": {
+ "aura/di": "~2.0",
+ "php": ">=5.3.0",
+ "psr/log": "~1.0"
+ },
+ "type": "library",
+ "extra": {
+ "aura": {
+ "type": "kernel",
+ "config": {
+ "common": "Aura\\Project_Kernel\\_Config\\Common"
+ }
+ },
+ "branch-alias": {
+ "dev-develop-2": "2.0.x-dev"
+ }
+ },
+ "autoload": {
+ "psr-4": {
+ "Aura\\Project_Kernel\\": "src/",
+ "Aura\\Project_Kernel\\_Config\\": "config/"
+ }
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "BSD-2-Clause"
+ ],
+ "authors": [
+ {
+ "name": "Aura.Project_Kernel Contributors",
+ "homepage": "https://github.com/auraphp/Aura.Project_Kernel/contributors"
+ }
+ ],
+ "description": "The shared kernel files for an Aura project.",
+ "homepage": "https://github.com/auraphp/Aura.Project_Kernel",
+ "keywords": [
+ "kernel",
+ "project"
+ ],
+ "time": "2015-03-27 22:29:48"
+ },
+ {
+ "name": "aura/router",
+ "version": "2.3.1",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/auraphp/Aura.Router.git",
+ "reference": "d8cb21b7fa8d2b2ae874093d5440688b3356f9c4"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/auraphp/Aura.Router/zipball/d8cb21b7fa8d2b2ae874093d5440688b3356f9c4",
+ "reference": "d8cb21b7fa8d2b2ae874093d5440688b3356f9c4",
+ "shasum": ""
+ },
+ "require": {
+ "php": ">=5.3.0"
+ },
+ "require-dev": {
+ "aura/di": "~2.0"
+ },
+ "type": "library",
+ "extra": {
+ "aura": {
+ "type": "library",
+ "config": {
+ "common": "Aura\\Router\\_Config\\Common"
+ }
+ }
+ },
+ "autoload": {
+ "psr-4": {
+ "Aura\\Router\\": "src/",
+ "Aura\\Router\\_Config\\": "config/"
+ }
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "BSD-2-Clause"
+ ],
+ "authors": [
+ {
+ "name": "Aura.Router Contributors",
+ "homepage": "https://github.com/auraphp/Aura.Router/contributors"
+ }
+ ],
+ "description": "A web router implementation; given a URI path and a copy of $_SERVER, it will extract path-info parameter values for a specific route.",
+ "homepage": "https://github.com/auraphp/Aura.Router",
+ "keywords": [
+ "route",
+ "router",
+ "routing"
+ ],
+ "time": "2016-10-03 20:00:15"
+ },
+ {
+ "name": "aura/view",
+ "version": "2.1.1",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/auraphp/Aura.View.git",
+ "reference": "defd8821dd1fe871ab23bf70bab6efc5323a701e"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/auraphp/Aura.View/zipball/defd8821dd1fe871ab23bf70bab6efc5323a701e",
+ "reference": "defd8821dd1fe871ab23bf70bab6efc5323a701e",
+ "shasum": ""
+ },
+ "require": {
+ "php": ">=5.4.0"
+ },
+ "require-dev": {
+ "aura/di": "~2.0"
+ },
+ "type": "library",
+ "extra": {
+ "aura": {
+ "type": "library",
+ "config": {
+ "common": "Aura\\View\\_Config\\Common"
+ }
+ },
+ "branch-alias": {
+ "dev-develop-2": "2.0.x-dev"
+ }
+ },
+ "autoload": {
+ "psr-4": {
+ "Aura\\View\\": "src/",
+ "Aura\\View\\_Config\\": "config/"
+ }
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "BSD-2-Clause"
+ ],
+ "authors": [
+ {
+ "name": "Aura.View Contributors",
+ "homepage": "https://github.com/auraphp/Aura.View/contributors"
+ }
+ ],
+ "description": "Provides an implementation of the TemplateView and TwoStepView patterns, with support for helpers and for closures as templates, using PHP itself as the templating language.",
+ "homepage": "https://github.com/auraphp/Aura.View",
+ "keywords": [
+ "Escape",
+ "escaper",
+ "escaping",
+ "template",
+ "template view",
+ "two step view",
+ "two-step view",
+ "twostep view",
+ "view"
+ ],
+ "time": "2015-03-27 18:49:40"
+ },
+ {
+ "name": "aura/web",
+ "version": "2.0.4",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/auraphp/Aura.Web.git",
+ "reference": "cdf90465761103c0843338aa675296100c5274d9"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/auraphp/Aura.Web/zipball/cdf90465761103c0843338aa675296100c5274d9",
+ "reference": "cdf90465761103c0843338aa675296100c5274d9",
+ "shasum": ""
+ },
+ "require": {
+ "php": ">=5.3.0"
+ },
+ "require-dev": {
+ "aura/di": "~2.0"
+ },
+ "type": "library",
+ "extra": {
+ "aura": {
+ "type": "library",
+ "config": {
+ "common": "Aura\\Web\\_Config\\Common"
+ }
+ }
+ },
+ "autoload": {
+ "psr-4": {
+ "Aura\\Web\\": "src/",
+ "Aura\\Web\\_Config\\": "config/"
+ }
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "BSD-2-Clause"
+ ],
+ "authors": [
+ {
+ "name": "Aura.Web Contributors",
+ "homepage": "https://github.com/auraphp/Aura.Web/contributors"
+ }
+ ],
+ "description": "Provides web Request and Response objects for use by web controllers and actions. These are representations of the PHP web environment, not HTTP request and response objects proper.",
+ "homepage": "https://github.com/auraphp/Aura.Web",
+ "keywords": [
+ "request",
+ "response"
+ ],
+ "time": "2016-10-03 21:32:34"
+ },
+ {
+ "name": "aura/web-kernel",
+ "version": "2.1.3",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/auraphp/Aura.Web_Kernel.git",
+ "reference": "42ab3bec4ccc83f575a1ea869ded964a3893aebe"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/auraphp/Aura.Web_Kernel/zipball/42ab3bec4ccc83f575a1ea869ded964a3893aebe",
+ "reference": "42ab3bec4ccc83f575a1ea869ded964a3893aebe",
+ "shasum": ""
+ },
+ "require": {
+ "aura/dispatcher": "~2.0",
+ "aura/project-kernel": "~2.0",
+ "aura/router": "~2.0",
+ "aura/web": "~2.0",
+ "php": ">=5.4.0"
+ },
+ "type": "library",
+ "extra": {
+ "aura": {
+ "type": "kernel",
+ "config": {
+ "common": "Aura\\Web_Kernel\\_Config\\Common",
+ "web-kernel-test": "Aura\\Web_Kernel\\_Config\\WebKernelTest"
+ }
+ }
+ },
+ "autoload": {
+ "psr-4": {
+ "Aura\\Web_Kernel\\": "src/",
+ "Aura\\Web_Kernel\\_Config\\": "config/"
+ }
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "BSD-2-Clause"
+ ],
+ "authors": [
+ {
+ "name": "Aura.Web_Kernel Contributors",
+ "homepage": "https://github.com/auraphp/Aura.Web_Kernel/contributors"
+ }
+ ],
+ "description": "The kernel files for an Aura web project.",
+ "homepage": "https://github.com/auraphp/Aura.Web_Kernel",
+ "keywords": [
+ "kernel",
+ "web"
+ ],
+ "time": "2016-10-03 21:38:39"
+ },
+ {
+ "name": "monolog/monolog",
+ "version": "1.22.0",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/Seldaek/monolog.git",
+ "reference": "bad29cb8d18ab0315e6c477751418a82c850d558"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/Seldaek/monolog/zipball/bad29cb8d18ab0315e6c477751418a82c850d558",
+ "reference": "bad29cb8d18ab0315e6c477751418a82c850d558",
+ "shasum": ""
+ },
+ "require": {
+ "php": ">=5.3.0",
+ "psr/log": "~1.0"
+ },
+ "provide": {
+ "psr/log-implementation": "1.0.0"
+ },
+ "require-dev": {
+ "aws/aws-sdk-php": "^2.4.9 || ^3.0",
+ "doctrine/couchdb": "~1.0@dev",
+ "graylog2/gelf-php": "~1.0",
+ "jakub-onderka/php-parallel-lint": "0.9",
+ "php-amqplib/php-amqplib": "~2.4",
+ "php-console/php-console": "^3.1.3",
+ "phpunit/phpunit": "~4.5",
+ "phpunit/phpunit-mock-objects": "2.3.0",
+ "ruflin/elastica": ">=0.90 <3.0",
+ "sentry/sentry": "^0.13",
+ "swiftmailer/swiftmailer": "~5.3"
+ },
+ "suggest": {
+ "aws/aws-sdk-php": "Allow sending log messages to AWS services like DynamoDB",
+ "doctrine/couchdb": "Allow sending log messages to a CouchDB server",
+ "ext-amqp": "Allow sending log messages to an AMQP server (1.0+ required)",
+ "ext-mongo": "Allow sending log messages to a MongoDB server",
+ "graylog2/gelf-php": "Allow sending log messages to a GrayLog2 server",
+ "mongodb/mongodb": "Allow sending log messages to a MongoDB server via PHP Driver",
+ "php-amqplib/php-amqplib": "Allow sending log messages to an AMQP server using php-amqplib",
+ "php-console/php-console": "Allow sending log messages to Google Chrome",
+ "rollbar/rollbar": "Allow sending log messages to Rollbar",
+ "ruflin/elastica": "Allow sending log messages to an Elastic Search server",
+ "sentry/sentry": "Allow sending log messages to a Sentry server"
+ },
+ "type": "library",
+ "extra": {
+ "branch-alias": {
+ "dev-master": "2.0.x-dev"
+ }
+ },
+ "autoload": {
+ "psr-4": {
+ "Monolog\\": "src/Monolog"
+ }
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "MIT"
+ ],
+ "authors": [
+ {
+ "name": "Jordi Boggiano",
+ "email": "j.boggiano@seld.be",
+ "homepage": "http://seld.be"
+ }
+ ],
+ "description": "Sends your logs to files, sockets, inboxes, databases and various web services",
+ "homepage": "http://github.com/Seldaek/monolog",
+ "keywords": [
+ "log",
+ "logging",
+ "psr-3"
+ ],
+ "time": "2016-11-26 00:15:39"
+ },
+ {
+ "name": "psr/log",
+ "version": "1.0.2",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/php-fig/log.git",
+ "reference": "4ebe3a8bf773a19edfe0a84b6585ba3d401b724d"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/php-fig/log/zipball/4ebe3a8bf773a19edfe0a84b6585ba3d401b724d",
+ "reference": "4ebe3a8bf773a19edfe0a84b6585ba3d401b724d",
+ "shasum": ""
+ },
+ "require": {
+ "php": ">=5.3.0"
+ },
+ "type": "library",
+ "extra": {
+ "branch-alias": {
+ "dev-master": "1.0.x-dev"
+ }
+ },
+ "autoload": {
+ "psr-4": {
+ "Psr\\Log\\": "Psr/Log/"
+ }
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "MIT"
+ ],
+ "authors": [
+ {
+ "name": "PHP-FIG",
+ "homepage": "http://www.php-fig.org/"
+ }
+ ],
+ "description": "Common interface for logging libraries",
+ "homepage": "https://github.com/php-fig/log",
+ "keywords": [
+ "log",
+ "psr",
+ "psr-3"
+ ],
+ "time": "2016-10-10 12:19:37"
+ },
+ {
+ "name": "zbateson/mail-mime-parser",
+ "version": "0.3.3",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/zbateson/MailMimeParser.git",
+ "reference": "b2e1e512e7475a2c72c8cdeff76ce07a42b5636d"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/zbateson/MailMimeParser/zipball/b2e1e512e7475a2c72c8cdeff76ce07a42b5636d",
+ "reference": "b2e1e512e7475a2c72c8cdeff76ce07a42b5636d",
+ "shasum": ""
+ },
+ "require": {
+ "ext-mbstring": "*",
+ "php": ">=5.4"
+ },
+ "require-dev": {
+ "evert/phpdoc-md": "~0.1.1",
+ "phing/phing": "2.*",
+ "phpdocumentor/phpdocumentor": "2.*",
+ "phpunit/phpunit": "~4.8"
+ },
+ "type": "library",
+ "autoload": {
+ "psr-4": {
+ "ZBateson\\MailMimeParser\\": "src/"
+ }
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "BSD-2-Clause"
+ ],
+ "authors": [
+ {
+ "name": "Zaahid Bateson",
+ "email": "zbateson@users.noreply.github.com"
+ }
+ ],
+ "description": "PSR-2 compliant mime mail parser",
+ "homepage": "https://github.com/zbateson/MailMimeParser",
+ "keywords": [
+ "mail",
+ "mime",
+ "parser"
+ ],
+ "time": "2016-12-22 21:28:11"
+ }
+ ],
+ "packages-dev": [],
+ "aliases": [],
+ "minimum-stability": "stable",
+ "stability-flags": [],
+ "prefer-stable": false,
+ "prefer-lowest": false,
+ "platform": [],
+ "platform-dev": []
+}
diff --git a/config/Common.php b/config/Common.php
new file mode 100644
index 0000000..dbafc49
--- /dev/null
+++ b/config/Common.php
@@ -0,0 +1,81 @@
+set('aura/project-kernel:logger', $di->lazyNew('Monolog\Logger'));
+
+ $di->params['Aura\View\View']['helpers'] = $di->lazyGet('aura/html:helper');
+ $di->params['Aura\View\TemplateRegistry']['paths'] = [
+ dirname(__DIR__) . '/templates/views',
+ dirname(__DIR__) . '/templates/layouts',
+ ];
+ $di->set('view', $di->lazyNew('Aura\View\View'));
+
+ $di->params['ZBateson\MailboxFolder\Domain\EmailFolderGateway'] = [
+ 'mailMimeParser' => $di->lazyNew('ZBateson\MailMimeParser\MailMimeParser'),
+ ];
+ $di->params['ZBateson\MailboxFolder\App\Actions\EmailListAction'] = [
+ 'request' => $di->lazyGet('aura/web-kernel:request'),
+ 'response' => $di->lazyGet('aura/web-kernel:response'),
+ 'view' => $di->lazyGet('view'),
+ 'emailFolderGateway' => $di->lazyNew('ZBateson\MailboxFolder\Domain\EmailFolderGateway'),
+ ];
+ $di->params['ZBateson\MailboxFolder\App\Actions\EmailViewAction'] = [
+ 'request' => $di->lazyGet('aura/web-kernel:request'),
+ 'response' => $di->lazyGet('aura/web-kernel:response'),
+ 'view' => $di->lazyGet('view'),
+ 'emailFolderGateway' => $di->lazyNew('ZBateson\MailboxFolder\Domain\EmailFolderGateway'),
+ ];
+ }
+
+ public function modify(Container $di)
+ {
+ $this->modifyLogger($di);
+ $this->modifyWebRouter($di);
+ $this->modifyWebDispatcher($di);
+ }
+
+ public function modifyLogger(Container $di)
+ {
+ $project = $di->get('project');
+ $mode = $project->getMode();
+ $file = $project->getPath("tmp/log/{$mode}.log");
+
+ $logger = $di->get('aura/project-kernel:logger');
+ $logger->pushHandler($di->newInstance(
+ 'Monolog\Handler\StreamHandler',
+ [
+ 'stream' => $file,
+ ]
+ ));
+ }
+
+ public function modifyWebRouter(Container $di)
+ {
+ $router = $di->get('aura/web-kernel:router');
+
+ $router->add('list', '/')
+ ->setValues(['action' => 'list']);
+ $router->add('view', '/view')
+ ->setValues(['action' => 'view']);
+ }
+
+ public function modifyWebDispatcher($di)
+ {
+ $dispatcher = $di->get('aura/web-kernel:dispatcher');
+ $dispatcher->setObject(
+ 'list',
+ $di->lazyNew('ZBateson\MailboxFolder\App\Actions\EmailListAction')
+ );
+ $dispatcher->setObject(
+ 'view',
+ $di->lazyNew('ZBateson\MailboxFolder\App\Actions\EmailViewAction')
+ );
+ }
+}
diff --git a/config/Dev.default.php b/config/Dev.default.php
new file mode 100644
index 0000000..339a30a
--- /dev/null
+++ b/config/Dev.default.php
@@ -0,0 +1,20 @@
+setter['ZBateson\MailboxFolder\Domain\EmailFolderGateway']['setPath'] = '/path/to/mailbox/folder';
+ }
+
+ public function modify(Container $di)
+ {
+ }
+}
diff --git a/config/Prod.default.php b/config/Prod.default.php
new file mode 100644
index 0000000..9adc509
--- /dev/null
+++ b/config/Prod.default.php
@@ -0,0 +1,17 @@
+setter['ZBateson\MailboxFolder\Domain\EmailFolderGateway']['setPath'] = '/path/to/mailbox/folder';
+ }
+
+ public function modify(Container $di)
+ {
+ }
+}
diff --git a/config/Test.default.php b/config/Test.default.php
new file mode 100644
index 0000000..f7c9ec7
--- /dev/null
+++ b/config/Test.default.php
@@ -0,0 +1,18 @@
+setter['ZBateson\MailboxFolder\Domain\EmailFolderGateway']['setPath'] = '/path/to/mailbox/folder';
+ }
+
+ public function modify(Container $di)
+ {
+
+ }
+}
diff --git a/config/_env.php b/config/_env.php
new file mode 100644
index 0000000..5c2e8d1
--- /dev/null
+++ b/config/_env.php
@@ -0,0 +1,6 @@
+
+
+ email->getHtmlContent(); + if ($html !== null) { + echo preg_replace('/.*?
(.*?)<\/body>.*?/ims', '$1', $html); + } else { + echo nl2br($this->escape()->html($this->email->getTextContent())); + } + ?> + diff --git a/tests/WebProjectTest.php b/tests/WebProjectTest.php new file mode 100644 index 0000000..4dd43a0 --- /dev/null +++ b/tests/WebProjectTest.php @@ -0,0 +1,13 @@ +assertSame($expect, $actual); + } +} diff --git a/web/.htaccess b/web/.htaccess new file mode 100644 index 0000000..6e2f824 --- /dev/null +++ b/web/.htaccess @@ -0,0 +1,20 @@ +