From d2234c0ad834dbbcffbc7c3eb466829aa9adf21f Mon Sep 17 00:00:00 2001 From: Adam Backstrom Date: Thu, 25 Jul 2013 12:25:49 -0400 Subject: [PATCH] Add ActionDateC --- classes.php | 22 ++++++++++++++++++++++ index.php | 1 + 2 files changed, 23 insertions(+) diff --git a/classes.php b/classes.php index af21eba..e7e59dd 100644 --- a/classes.php +++ b/classes.php @@ -173,6 +173,28 @@ class ActionJsonEncode extends AbstractAction } } +class ActionDateC extends AbstractAction +{ + public function __construct( $value ) + { + parent::__construct( $value ); + + $this->setContainer( new DivContainer ); + $this->setFormatter( new DbugFormatter ); + } + + public function decode() + { + $results = array(); + + array_map(function($value) use (&$results) { + $results[$value] = date('c', $value); + }, explode("\n", $this->value)); + + return $results; + } +} + interface ContainerInterface { public function wrap( $contents ); diff --git a/index.php b/index.php index d742098..b15c4db 100644 --- a/index.php +++ b/index.php @@ -43,6 +43,7 @@ if( 'POST' === $_SERVER['REQUEST_METHOD'] ) { +