return array(
'modules' => array(
'Application',
+ 'Auth',
),
'module_listener_options' => array(
'config_glob_paths' => array(
'template_map' => array(
'layout/layout' => __DIR__ . '/../view/layout/layout.phtml',
'application/index/index' => __DIR__ . '/../view/application/index/index.phtml',
+ 'application/index/test' => __DIR__ . '/../view/application/index/test.phtml',
'error/404' => __DIR__ . '/../view/error/404.phtml',
'error/index' => __DIR__ . '/../view/error/index.phtml',
),
{
return new ViewModel();
}
+
+ public function testAction()
+ {
+ return array(
+ 'name' => 'test: ajout action',
+ );
+ }
}
--- /dev/null
+<div class="hero-unit">
+ <h1><?php echo sprintf($this->translate('Welcome to %sZend Framework 2%s'), '<span class="zf-green">', '</span>') ?></h1>
+ <h2><?php echo sprintf($this->translate($this->name), '<strong>', '</strong>') ?></h2>
+</div>
--- /dev/null
+<?php
+/**
+ * Application blanche (http://zf2.biz)
+ * utiise Zend Framework (http://framework.zend.com/)
+ *
+ * @link http://github.com/zendframework/ZendSkeletonApplication for the canonical source repository
+ * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
+ * @license http://framework.zend.com/license/new-bsd New BSD License
+ */
+
+namespace Auth;
+
+use Zend\Mvc\ModuleRouteListener;
+use Zend\Mvc\MvcEvent;
+
+class Module
+{
+ public function onBootstrap(MvcEvent $e)
+ {
+ $e->getApplication()->getServiceManager()->get('translator');
+ $eventManager = $e->getApplication()->getEventManager();
+ $moduleRouteListener = new ModuleRouteListener();
+ $moduleRouteListener->attach($eventManager);
+ }
+
+ public function getConfig()
+ {
+ return include __DIR__ . '/config/module.config.php';
+ }
+
+ public function getAutoloaderConfig()
+ {
+ return array(
+ 'Zend\Loader\ClassMapAutoloader' => array(
+ __DIR__ . '/config/autoload_classmap.php',
+ ),
+ );
+ }
+
+}
--- /dev/null
+<?php
+return array(
+ 'Auth\Controller\IndexController' => __DIR__ . '/../src/Auth/Controller/IndexController.php',
+);
--- /dev/null
+<?php
+/**
+ * Application blanche (http://zf2.biz)
+ * utiise Zend Framework (http://framework.zend.com/)
+ *
+ * @link http://github.com/zendframework/ZendSkeletonApplication for the canonical source repository
+ * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
+ * @license http://framework.zend.com/license/new-bsd New BSD License
+ */
+
+return array(
+ 'router' => array(
+ 'routes' => array(
+ 'auth' => array(
+ 'type' => 'Literal',
+ 'options' => array(
+ 'route' => '/login',
+ 'defaults' => array(
+ '__NAMESPACE__' => 'Auth\Controller',
+ 'controller' => 'Index',
+ 'action' => 'index',
+ ),
+ ),
+ 'may_terminate' => true,
+ ),
+ ),
+ ),
+ 'controllers' => array(
+ 'invokables' => array(
+ 'Auth\Controller\Index' => 'Auth\Controller\IndexController'
+ ),
+ ),
+ 'view_manager' => array(
+ 'display_not_found_reason' => true,
+ 'display_exceptions' => true,
+ 'doctype' => 'HTML5',
+ 'not_found_template' => 'error/404',
+ 'exception_template' => 'error/index',
+ 'template_map' => array(
+ 'layout/layout' => __DIR__ . '/../../Application/view/layout/layout.phtml',
+ 'error/404' => __DIR__ . '/../../Application/view/error/404.phtml',
+ 'error/index' => __DIR__ . '/../../Application/view/error/index.phtml',
+ 'auth/index/index' => __DIR__ . '/../view/auth/index/index.phtml',
+ ),
+ 'template_path_stack' => array(
+ __DIR__ . '/../view',
+ ),
+ ),
+);
--- /dev/null
+<?php
+/**
+ * Zend Framework (http://framework.zend.com/)
+ *
+ * @link http://github.com/zendframework/ZendSkeletonApplication for the canonical source repository
+ * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
+ * @license http://framework.zend.com/license/new-bsd New BSD License
+ */
+
+namespace Auth\Controller;
+
+use Zend\Mvc\Controller\AbstractActionController;
+
+
+class IndexController extends AbstractActionController
+{
+ public function indexAction()
+ {
+ return array();
+ }
+}
--- /dev/null
+<div class="hero-unit">
+ <h1><?php echo sprintf($this->translate('Welcome to %sZend Framework 2%s'), '<span class="zf-green">', '</span>') ?></h1>
+ <h2><?php echo sprintf($this->translate('Page %sAUTHENTIFICATION%s'), '<strong>', '</strong>') ?></h2>
+</div>
-Alias /appblanche /var/git/zf2biz/application-blanche/public
+Alias /bookzf2 /var/git/zf2biz/application-blanche/public
<Directory /var/git/zf2biz/application-blanche/public>
Order deny,allow
$keys[] = "{$k}: {$v}";
}
$keys = implode(', ', $keys);
- throw new \Exception("cannot get row {{$keys}} in table 'galerie'");
+ throw new \Exception("cannot get row {{$keys}} in table '{$this->table}'");
}
return $row;
}
$keys[] = "{$k}: {$v}";
}
$keys = implode(', ', $keys);
- throw new \Exception("cannot update row {{$keys}} in table 'galerie'");
+ throw new \Exception("cannot update row {{$keys}} in table '{$this->table}'");
}
}