diff --git a/composer.lock b/composer.lock
index 6460dc2d..78745124 100644
--- a/composer.lock
+++ b/composer.lock
@@ -11,12 +11,12 @@
"source": {
"type": "git",
"url": "https://github.com/zendframework/ZendDeveloperTools.git",
- "reference": "23bcd78e80bd963f08b125d80587a640ad7a237d"
+ "reference": "9a8848612c0c6d9890dd6533b3dd5045745e1299"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/zendframework/ZendDeveloperTools/zipball/23bcd78e80bd963f08b125d80587a640ad7a237d",
- "reference": "23bcd78e80bd963f08b125d80587a640ad7a237d",
+ "url": "https://api.github.com/repos/zendframework/ZendDeveloperTools/zipball/9a8848612c0c6d9890dd6533b3dd5045745e1299",
+ "reference": "9a8848612c0c6d9890dd6533b3dd5045745e1299",
"shasum": ""
},
"require": {
@@ -64,7 +64,7 @@
"module",
"zf2"
],
- "time": "2013-10-24 10:03:13"
+ "time": "2014-01-02 17:27:54"
},
{
"name": "zendframework/zendframework",
diff --git a/composer.phar b/composer.phar
index ee79e58c..c8d41a5d 100755
Binary files a/composer.phar and b/composer.phar differ
diff --git a/config/application.config.php b/config/application.config.php
index e8e5a542..89222f0b 100644
--- a/config/application.config.php
+++ b/config/application.config.php
@@ -15,10 +15,10 @@
'Job',
'File',
'Log',
- //'Restore',
- //'Statistics',
+ 'Restore',
+ 'Statistics',
'Admin',
- //'User',
+ 'User',
);
if($env == 'development') {
diff --git a/module/Application/config/module.config.php b/module/Application/config/module.config.php
index 6a9d3cd9..ec724e0b 100644
--- a/module/Application/config/module.config.php
+++ b/module/Application/config/module.config.php
@@ -157,17 +157,14 @@
'label' => 'Job',
'route' => 'job',
),
- /*
array(
'label' => 'File',
'route' => 'file',
),
- */
array(
'label' => 'Log',
'route' => 'log',
),
- /*
array(
'label' => 'Restore',
'route' => 'restore',
@@ -176,17 +173,14 @@
'label' => 'Statistics',
'route' => 'statistics',
),
- */
array(
'label' => 'Administration',
'route' => 'admin',
),
- /*
array(
'label' => 'User',
'route' => 'user',
),
- */
),
),
);
diff --git a/module/Restore/Module.php b/module/Restore/Module.php
index 495a4444..c43c6a1e 100644
--- a/module/Restore/Module.php
+++ b/module/Restore/Module.php
@@ -7,13 +7,8 @@
use Zend\Db\ResultSet\ResultSet;
use Zend\Db\TableGateway\TableGateway;
-class Module {
-
- public function getServiceConfig()
- {
- return array(
- );
- }
+class Module
+{
public function getAutoloaderConfig()
{
@@ -22,7 +17,7 @@ public function getAutoloaderConfig()
__DIR__ . '/autoload_classmap.php',
),
'Zend\Loader\StandardAutoloader' => array(
- 'namespace' => array(
+ 'namespaces' => array(
__NAMESPACE__ => __DIR__ . '/src/' . __NAMESPACE__,
),
),
@@ -34,4 +29,26 @@ public function getConfig()
return include __DIR__ . '/config/module.config.php';
}
+ public function getServiceConfig()
+ {
+ return array(
+ 'factories' => array(
+ 'Restore\Model\RestoreTable' => function($sm)
+ {
+ $tableGateway = $sm->get('RestoreTableGateway');
+ $table = new RestoreTable($tableGateway);
+ return $table;
+ },
+ 'RestoreTableGateway' => function($sm)
+ {
+ $dbAdapter = $sm->get('Zend\Db\Adapter\Adapter');
+ $resultSetPrototype = new ResultSet();
+ $resultSetPrototype->setArrayObjectPrototype(new Restore());
+ return new TableGateway('restore', $dbAdapter, null, $resultSetPrototype);
+ },
+ ),
+ );
+ }
+
}
+
diff --git a/module/Restore/config/module.config.php b/module/Restore/config/module.config.php
index 8e8b92b3..250feb9b 100644
--- a/module/Restore/config/module.config.php
+++ b/module/Restore/config/module.config.php
@@ -7,7 +7,7 @@
'Restore\Controller\Restore' => 'Restore\Controller\RestoreController',
),
),
-
+
'router' => array(
'routes' => array(
'restore' => array(
@@ -26,7 +26,7 @@
),
),
),
-
+
'view_manager' => array(
'template_path_stack' => array(
'restore' => __DIR__ . '/../view',
diff --git a/module/Restore/src/Restore/Controller/RestoreController.php b/module/Restore/src/Restore/Controller/RestoreController.php
index 2f1c503c..f433b39a 100644
--- a/module/Restore/src/Restore/Controller/RestoreController.php
+++ b/module/Restore/src/Restore/Controller/RestoreController.php
@@ -7,10 +7,11 @@
class RestoreController extends AbstractActionController
{
-
- public function indexAction()
+
+ public function indexAction()
{
return new ViewModel();
}
}
+
diff --git a/module/Restore/src/Restore/Model/Restore.php b/module/Restore/src/Restore/Model/Restore.php
index e69de29b..a74ff7ee 100644
--- a/module/Restore/src/Restore/Model/Restore.php
+++ b/module/Restore/src/Restore/Model/Restore.php
@@ -0,0 +1,10 @@
+tableGateway = $tableGateway;
+ }
+
+ public function fetchAll()
+ {
+ $resultSet = $this->tableGateway->select();
+ return $resultSet;
+ }
+*/
+
+ public function __construct()
+ {
+ }
+
+}
+
diff --git a/module/Restore/view/restore/restore/index.phtml b/module/Restore/view/restore/restore/index.phtml
index 4dfbfe0f..0620e503 100644
--- a/module/Restore/view/restore/restore/index.phtml
+++ b/module/Restore/view/restore/restore/index.phtml
@@ -1,11 +1,9 @@
headTitle($title);
-
+ $title = 'Restore';
+ $this->headTitle($title);
?>
-
translate($title); ?>
+
diff --git a/module/Statistics/Module.php b/module/Statistics/Module.php
new file mode 100644
index 00000000..ceeb575b
--- /dev/null
+++ b/module/Statistics/Module.php
@@ -0,0 +1,54 @@
+ array(
+ __DIR__ . '/autoload_classmap.php',
+ ),
+ 'Zend\Loader\StandardAutoloader' => array(
+ 'namespaces' => array(
+ __NAMESPACE__ => __DIR__ . '/src/' . __NAMESPACE__,
+ ),
+ ),
+ );
+ }
+
+ public function getConfig()
+ {
+ return include __DIR__ . '/config/module.config.php';
+ }
+
+ public function getServiceConfig()
+ {
+ return array(
+ 'factories' => array(
+ 'Statistics\Model\StatisticsTable' => function($sm)
+ {
+ $tableGateway = $sm->get('StatisticsTableGateway');
+ $table = new StatisticsTable($tableGateway);
+ return $table;
+ },
+ 'StatisticsTableGateway' => function($sm)
+ {
+ $dbAdapter = $sm->get('Zend\Db\Adapter\Adapter');
+ $resultSetPrototype = new ResultSet();
+ $resultSetPrototype->setArrayObjectPrototype(new Statistics());
+ return new TableGateway('statistics', $dbAdapter, null, $resultSetPrototype);
+ },
+ ),
+ );
+ }
+
+}
+
diff --git a/module/Statistics/autoload_classmap.php b/module/Statistics/autoload_classmap.php
new file mode 100644
index 00000000..d864ec91
--- /dev/null
+++ b/module/Statistics/autoload_classmap.php
@@ -0,0 +1,4 @@
+ array(
+ 'invokables' => array(
+ 'Statistics\Controller\Statistics' => 'Statistics\Controller\StatisticsController',
+ ),
+ ),
+
+ 'router' => array(
+ 'routes' => array(
+ 'statistics' => array(
+ 'type' => 'segment',
+ 'options' => array(
+ 'route' => '/statistics[/][:action][/:id]',
+ 'constraints' => array(
+ 'action' => '[a-zA-Z][a-zA-Z0-9_-]*',
+ 'id' => '[0-9]+',
+ ),
+ 'defaults' => array(
+ 'controller' => 'Statistics\Controller\Statistics',
+ 'action' => 'index',
+ ),
+ ),
+ ),
+ ),
+ ),
+
+ 'view_manager' => array(
+ 'template_path_stack' => array(
+ 'statistics' => __DIR__ . '/../view',
+ ),
+ ),
+
+);
diff --git a/module/Statistics/src/Statistics/Controller/StatisticsController.php b/module/Statistics/src/Statistics/Controller/StatisticsController.php
new file mode 100644
index 00000000..f97d286a
--- /dev/null
+++ b/module/Statistics/src/Statistics/Controller/StatisticsController.php
@@ -0,0 +1,17 @@
+tableGateway = $tableGateway;
+ }
+
+ public function fetchAll()
+ {
+ $resultSet = $this->tableGateway->select();
+ return $resultSet;
+ }
+*/
+
+ public function __construct()
+ {
+ }
+
+}
+
diff --git a/module/Statistics/view/statistics/statistics/index.phtml b/module/Statistics/view/statistics/statistics/index.phtml
new file mode 100644
index 00000000..d01e8270
--- /dev/null
+++ b/module/Statistics/view/statistics/statistics/index.phtml
@@ -0,0 +1,9 @@
+headTitle($title);
+?>
+
+
+
+
+
diff --git a/module/User/Module.php b/module/User/Module.php
new file mode 100644
index 00000000..3f37ed2a
--- /dev/null
+++ b/module/User/Module.php
@@ -0,0 +1,54 @@
+ array(
+ __DIR__ . '/autoload_classmap.php',
+ ),
+ 'Zend\Loader\StandardAutoloader' => array(
+ 'namespaces' => array(
+ __NAMESPACE__ => __DIR__ . '/src/' . __NAMESPACE__,
+ ),
+ ),
+ );
+ }
+
+ public function getConfig()
+ {
+ return include __DIR__ . '/config/module.config.php';
+ }
+
+ public function getServiceConfig()
+ {
+ return array(
+ 'factories' => array(
+ 'User\Model\UserTable' => function($sm)
+ {
+ $tableGateway = $sm->get('UserTableGateway');
+ $table = new UserTable($tableGateway);
+ return $table;
+ },
+ 'UserTableGateway' => function($sm)
+ {
+ $dbAdapter = $sm->get('Zend\Db\Adapter\Adapter');
+ $resultSetPrototype = new ResultSet();
+ $resultSetPrototype->setArrayObjectPrototype(new User());
+ return new TableGateway('user', $dbAdapter, null, $resultSetPrototype);
+ },
+ ),
+ );
+ }
+
+}
+
diff --git a/module/User/autoload_classmap.php b/module/User/autoload_classmap.php
new file mode 100644
index 00000000..d864ec91
--- /dev/null
+++ b/module/User/autoload_classmap.php
@@ -0,0 +1,4 @@
+ array(
+ 'invokables' => array(
+ 'User\Controller\User' => 'User\Controller\UserController',
+ ),
+ ),
+
+ 'router' => array(
+ 'routes' => array(
+ 'user' => array(
+ 'type' => 'segment',
+ 'options' => array(
+ 'route' => '/user[/][:action][/:id]',
+ 'constraints' => array(
+ 'action' => '[a-zA-Z][a-zA-Z0-9_-]*',
+ 'id' => '[0-9]+',
+ ),
+ 'defaults' => array(
+ 'controller' => 'User\Controller\User',
+ 'action' => 'index',
+ ),
+ ),
+ ),
+ ),
+ ),
+
+ 'view_manager' => array(
+ 'template_path_stack' => array(
+ 'user' => __DIR__ . '/../view',
+ ),
+ ),
+
+);
diff --git a/module/User/src/User/Controller/UserController.php b/module/User/src/User/Controller/UserController.php
new file mode 100644
index 00000000..93335327
--- /dev/null
+++ b/module/User/src/User/Controller/UserController.php
@@ -0,0 +1,17 @@
+tableGateway = $tableGateway;
+ }
+
+ public function fetchAll()
+ {
+ $resultSet = $this->tableGateway->select();
+ return $resultSet;
+ }
+*/
+
+ public function __construct()
+ {
+ }
+
+}
+
diff --git a/module/User/view/user/user/index.phtml b/module/User/view/user/user/index.phtml
new file mode 100644
index 00000000..ea870555
--- /dev/null
+++ b/module/User/view/user/user/index.phtml
@@ -0,0 +1,9 @@
+headTitle($title);
+?>
+
+
+
+
+