Skip to content
Snippets Groups Projects
Commit d5523580 authored by lecluse's avatar lecluse
Browse files

Mise en place du Skeleton

parent 5baa2c35
No related branches found
No related tags found
No related merge requests found
Showing
with 3450 additions and 0 deletions
{
"name": "unicaen/unicaen-skeleton-application",
"description": "Squelette d'application Unicaen (ZF2)",
"repositories": [
{
"type": "composer",
"url": "http://dev.unicaen.fr/packagist"
}
],
"require": {
"unicaen/unicaen-app": "dev-trunk",
"unicaen/unicaen-auth": "dev-trunk"
}
}
\ No newline at end of file
This diff is collapsed.
<?php
return array(
'modules' => array(
'Application',
'ZfcBase', 'DoctrineModule', 'DoctrineORMModule', 'ZfcUser', 'ZfcUserDoctrineORM', 'BjyAuthorize',
'UnicaenApp', 'AssetManager',
'UnicaenAuth',
),
'module_listener_options' => array(
'config_glob_paths' => array(
'config/autoload/{,*.}{global,local}.php',
),
'module_paths' => array(
'./module',
'./vendor',
),
),
);
About this directory:
=====================
By default, this application is configured to load all configs in
`./config/autoload/{,*.}{global,local}.php`. Doing this provides a
location for a developer to drop in configuration override files provided by
modules, as well as cleanly provide individual, application-wide config files
for things like database connections, etc.
<?php
return array(
'translator' => array(
'locale' => 'fr_FR',
),
);
<?php
return array(
'view_manager' => array(
'display_not_found_reason' => false,
'display_exceptions' => false,
),
);
<?php
/**
* UnicaenApp Global Configuration
*
* If you have a ./config/autoload/ directory set up for your project,
* drop this config file in it and change the values as you wish.
*/
$settings = array(
/**
* Informations concernant cette application
*/
'app_infos' => array(
'nom' => "OSE",
'desc' => "Organisation des Services d'Enseignement",
'version' => "0.0.1",
'date' => "28/01/2014",
'contact' => array('mail' => "dsi.applications@unicaen.fr", /*'tel' => "01 02 03 04 05"*/),
'mentionsLegales' => "http://www.unicaen.fr/outils-portail-institutionnel/mentions-legales/",
'informatiqueEtLibertes' => "http://www.unicaen.fr/outils-portail-institutionnel/informatique-et-libertes/",
),
);
/**
* You do not need to edit below this line
*/
return array(
'unicaen-app' => $settings,
);
\ No newline at end of file
<?php
/**
* UnicaenAuth Global Configuration
*
* If you have a ./config/autoload/ directory set up for your project, you can
* drop this config file in it and change the values as you wish.
*/
$settings = array(
/**
* Flag indiquant si l'utilisateur authenitifié avec succès via l'annuaire LDAP doit
* être enregistré/mis à jour dans la table des utilisateurs de l'appli.
*/
'save_ldap_user_in_database' => false,
/**
* Enable registration
* Allows users to register through the website.
* Accepted values: boolean true or false
*/
'enable_registration' => false,
);
/**
* You do not need to edit below this line
*/
return array(
'unicaen-auth' => $settings,
'zfcuser' => array(
$k='enable_registration' => isset($settings[$k]) ? $settings[$k] : false,
),
);
\ No newline at end of file
<?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
*/
/**
* This autoloading setup is really more complicated than it needs to be for most
* applications. The added complexity is simply to reduce the time it takes for
* new developers to be productive with a fresh skeleton. It allows autoloading
* to be correctly configured, regardless of the installation method and keeps
* the use of composer completely optional. This setup should work fine for
* most users, however, feel free to configure autoloading however you'd like.
*/
// Composer autoloading
if (file_exists('vendor/autoload.php')) {
$loader = include 'vendor/autoload.php';
}
$zf2Path = false;
if (is_dir('vendor/ZF2/library')) {
$zf2Path = 'vendor/ZF2/library';
} elseif (getenv('ZF2_PATH')) { // Support for ZF2_PATH environment variable or git submodule
$zf2Path = getenv('ZF2_PATH');
} elseif (get_cfg_var('zf2_path')) { // Support for zf2_path directive value
$zf2Path = get_cfg_var('zf2_path');
}
if ($zf2Path) {
if (isset($loader)) {
$loader->add('Zend', $zf2Path);
} else {
include $zf2Path . '/Zend/Loader/AutoloaderFactory.php';
Zend\Loader\AutoloaderFactory::factory(array(
'Zend\Loader\StandardAutoloader' => array(
'autoregister_zf' => true
)
));
}
}
if (!class_exists('Zend\Loader\AutoloaderFactory')) {
throw new RuntimeException('Unable to load ZF2. Run `php composer.phar install` or define a ZF2_PATH environment variable.');
}
<?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 Application;
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\StandardAutoloader' => array(
'namespaces' => array(
__NAMESPACE__ => __DIR__ . '/src/' . __NAMESPACE__,
),
),
);
}
}
<?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
*/
return array(
'router' => array(
'routes' => array(
'home' => array(
'type' => 'Zend\Mvc\Router\Http\Literal',
'options' => array(
'route' => '/',
'defaults' => array(
'controller' => 'Application\Controller\Index', // <-- change here
'action' => 'index',
),
),
),
// The following is a route to simplify getting started creating
// new controllers and actions without needing to create a new
// module. Simply drop new controllers in, and you can access them
// using the path /application/:controller/:action
'application' => array(
'type' => 'Literal',
'options' => array(
'route' => '/application',
'defaults' => array(
'__NAMESPACE__' => 'Application\Controller',
'controller' => 'Index',
'action' => 'index',
),
),
'may_terminate' => true,
'child_routes' => array(
'default' => array(
'type' => 'Segment',
'options' => array(
'route' => '/[:controller[/:action]]',
'constraints' => array(
'controller' => '[a-zA-Z][a-zA-Z0-9_-]*',
'action' => '[a-zA-Z][a-zA-Z0-9_-]*',
),
'defaults' => array(
),
),
),
),
),
),
),
'service_manager' => array(
'factories' => array(
),
),
'translator' => array(
'locale' => 'fr_FR', // en_US
'translation_file_patterns' => array(
array(
'type' => 'gettext',
'base_dir' => __DIR__ . '/../language',
'pattern' => '%s.mo',
),
),
),
'controllers' => array(
'invokables' => array(
'Application\Controller\Index' => 'Application\Controller\IndexController',
),
),
'view_manager' => array(
'template_path_stack' => array(
__DIR__ . '/../view',
),
),
);
File added
msgid ""
msgstr ""
"Project-Id-Version: ZendSkeletonApplication\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2012-07-05 22:17-0700\n"
"PO-Revision-Date: 2013-04-08 08:49+0100\n"
"Last-Translator: nommerci <nomerci@hotmail.fr>\n"
"Language-Team: ZF Contibutors <zf-devteam@zend.com>\n"
"Language: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Poedit-KeywordsList: translate\n"
"X-Poedit-Language: English\n"
"X-Poedit-Country: UNITED STATES\n"
"X-Poedit-Basepath: .\n"
"X-Poedit-SearchPath-0: ..\n"
#: ../view/layout/layout.phtml:6
#: ../view/layout/layout.phtml:33
#, fuzzy
msgid "Skeleton Application"
msgstr ""
#: ../view/layout/layout.phtml:36
msgid "Home"
msgstr ""
#: ../view/layout/layout.phtml:50
msgid "All rights reserved."
msgstr ""
#: ../view/application/index/index.phtml:2
#, php-format
msgid "Welcome to %sZend Framework 2%s"
msgstr ""
#: ../view/application/index/index.phtml:3
#, php-format
msgid "Congratulations! You have successfully installed the %sZF2 Skeleton Application%s. You are currently running Zend Framework version %s. This skeleton can serve as a simple starting point for you to begin building your application on ZF2."
msgstr ""
#: ../view/application/index/index.phtml:4
msgid "Fork Zend Framework 2 on GitHub"
msgstr ""
#: ../view/application/index/index.phtml:10
msgid "Follow Development"
msgstr ""
#: ../view/application/index/index.phtml:11
#, php-format
msgid "Zend Framework 2 is under active development. If you are interested in following the development of ZF2, there is a special ZF2 portal on the official Zend Framework website which provides links to the ZF2 %swiki%s, %sdev blog%s, %sissue tracker%s, and much more. This is a great resource for staying up to date with the latest developments!"
msgstr ""
#: ../view/application/index/index.phtml:12
msgid "ZF2 Development Portal"
msgstr ""
#: ../view/application/index/index.phtml:16
msgid "Discover Modules"
msgstr ""
#: ../view/application/index/index.phtml:17
#, php-format
msgid "The community is working on developing a community site to serve as a repository and gallery for ZF2 modules. The project is available %son GitHub%s. The site is currently live and currently contains a list of some of the modules already available for ZF2."
msgstr ""
#: ../view/application/index/index.phtml:18
msgid "Explore ZF2 Modules"
msgstr ""
#: ../view/application/index/index.phtml:22
msgid "Help &amp; Support"
msgstr ""
#: ../view/application/index/index.phtml:23
#, php-format
msgid "If you need any help or support while developing with ZF2, you may reach us via IRC: %s#zftalk on Freenode%s. We'd love to hear any questions or feedback you may have regarding the beta releases. Alternatively, you may subscribe and post questions to the %smailing lists%s."
msgstr ""
#: ../view/application/index/index.phtml:24
msgid "Ping us on IRC"
msgstr ""
#: ../view/error/index.phtml:1
msgid "An error occurred"
msgstr ""
#: ../view/error/index.phtml:8
msgid "Additional information"
msgstr ""
#: ../view/error/index.phtml:11
#: ../view/error/index.phtml:35
msgid "File"
msgstr ""
#: ../view/error/index.phtml:15
#: ../view/error/index.phtml:39
msgid "Message"
msgstr ""
#: ../view/error/index.phtml:19
#: ../view/error/index.phtml:43
#: ../view/error/404.phtml:55
msgid "Stack trace"
msgstr ""
#: ../view/error/index.phtml:29
msgid "Previous exceptions"
msgstr ""
#: ../view/error/index.phtml:58
msgid "No Exception available"
msgstr ""
#: ../view/error/404.phtml:1
msgid "A 404 error occurred"
msgstr ""
#: ../view/error/404.phtml:10
msgid "The requested controller was unable to dispatch the request."
msgstr ""
#: ../view/error/404.phtml:13
msgid "The requested controller could not be mapped to an existing controller class."
msgstr ""
#: ../view/error/404.phtml:16
msgid "The requested controller was not dispatchable."
msgstr ""
#: ../view/error/404.phtml:19
msgid "The requested URL could not be matched by routing."
msgstr ""
#: ../view/error/404.phtml:22
msgid "We cannot determine at this time why a 404 was generated."
msgstr ""
#: ../view/error/404.phtml:34
msgid "Controller"
msgstr ""
#: ../view/error/404.phtml:41
#, php-format
msgid "resolves to %s"
msgstr ""
#: ../view/error/404.phtml:51
msgid "Exception"
msgstr ""
File added
msgid ""
msgstr ""
"Project-Id-Version: ZendSkeletonApplication\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2012-07-05 22:32-0700\n"
"PO-Revision-Date: 2012-07-05 23:36-0700\n"
"Last-Translator: Evan Coury <me@evancoury.com>\n"
"Language-Team: ZF Contibutors <zf-devteam@zend.com>\n"
"Language: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Poedit-KeywordsList: translate\n"
"X-Poedit-Language: French\n"
"X-Poedit-Country: FRANCE\n"
"X-Poedit-Basepath: .\n"
"X-Poedit-SearchPath-0: ..\n"
#: ../view/layout/layout.phtml:6
#: ../view/layout/layout.phtml:33
msgid "Skeleton Application"
msgstr "Skeleton Application"
#: ../view/layout/layout.phtml:36
msgid "Home"
msgstr "Accueil"
#: ../view/layout/layout.phtml:50
msgid "All rights reserved."
msgstr "Tous droits réservés."
#: ../view/application/index/index.phtml:2
#, php-format
msgid "Welcome to %sZend Framework 2%s"
msgstr "Bienvenue dans le %sZend Framework 2%s"
#: ../view/application/index/index.phtml:3
#, php-format
msgid "Congratulations! You have successfully installed the %sZF2 Skeleton Application%s. You are currently running Zend Framework version %s. This skeleton can serve as a simple starting point for you to begin building your application on ZF2."
msgstr "Félicitations ! Vous avez installé avec succès le %sZF2 Skeleton Application%s. Vous utilisez actuellement Zend Framework version %s. Cette structure peut vous servir comme un point de départ simple pour démarrer la construction de votre application avec ZF2."
#: ../view/application/index/index.phtml:4
msgid "Fork Zend Framework 2 on GitHub"
msgstr "Faites un Fork de Zend Framework 2 sur GitHub"
#: ../view/application/index/index.phtml:10
msgid "Follow Development"
msgstr "Suivre le développement"
#: ../view/application/index/index.phtml:11
#, php-format
msgid "Zend Framework 2 is under active development. If you are interested in following the development of ZF2, there is a special ZF2 portal on the official Zend Framework website which provides links to the ZF2 %swiki%s, %sdev blog%s, %sissue tracker%s, and much more. This is a great resource for staying up to date with the latest developments!"
msgstr "Zend Framework 2 est en cours de développement. Si vous êtes intéressé pour suivre l'évolution de ZF2, il existe un portail dédié à ZF2 sur le site officiel Zend Framework qui propose des liens vers le %swiki%s ZF2, %sdev blog%s, %ssuivi des problèmes%s, et bien plus encore. Il s'agit d'une excellente ressource pour rester à jour sur les dernières évolutions !"
#: ../view/application/index/index.phtml:12
msgid "ZF2 Development Portal"
msgstr "Portail sur le développement de ZF2"
#: ../view/application/index/index.phtml:16
msgid "Discover Modules"
msgstr "Découvrez les modules"
#: ../view/application/index/index.phtml:17
#, php-format
msgid "The community is working on developing a community site to serve as a repository and gallery for ZF2 modules. The project is available %son GitHub%s. The site is currently live and currently contains a list of some of the modules already available for ZF2."
msgstr "La communauté travaille sur le développement d'un site communautaire avec l'objectif de servir de dépôt et de galerie pour les modules ZF2. Le projet est disponible %ssur GitHub%s. Le site est déjà en ligne, et contient une liste non exhaustive des modules déjà disponibles pour ZF2."
#: ../view/application/index/index.phtml:18
msgid "Explore ZF2 Modules"
msgstr "Explorer les modules ZF2"
#: ../view/application/index/index.phtml:22
msgid "Help &amp; Support"
msgstr "Aide &amp; support"
#: ../view/application/index/index.phtml:23
#, php-format
msgid "If you need any help or support while developing with ZF2, you may reach us via IRC: %s#zftalk on Freenode%s. We'd love to hear any questions or feedback you may have regarding the beta releases. Alternatively, you may subscribe and post questions to the %smailing lists%s."
msgstr "Si vous avez besoin d'aide ou de support en développant avec ZF2, vous pouvez nous joindre sur IRC : %s#zftalk sur Freenode%s. Nous aimerions avoir vos questions ou vos commentaires que vous pourriez avoir au sujet des versions bêta. Sinon, vous pouvez vous abonner, et poser des questions sur la %sliste de diffusion%s."
#: ../view/application/index/index.phtml:24
msgid "Ping us on IRC"
msgstr "Rejoignez-nous sur IRC"
#: ../view/error/index.phtml:1
msgid "An error occurred"
msgstr "Une erreur est survenue"
#: ../view/error/index.phtml:8
msgid "Additional information"
msgstr "Informations complémentaires"
#: ../view/error/index.phtml:11
#: ../view/error/index.phtml:35
msgid "File"
msgstr "Fichier"
#: ../view/error/index.phtml:15
#: ../view/error/index.phtml:39
msgid "Message"
msgstr "Message"
#: ../view/error/index.phtml:19
#: ../view/error/index.phtml:43
#: ../view/error/404.phtml:55
msgid "Stack trace"
msgstr "Pile d'exécution"
#: ../view/error/index.phtml:29
msgid "Previous exceptions"
msgstr "Exceptions précédentes"
#: ../view/error/index.phtml:58
msgid "No Exception available"
msgstr "Aucune exception disponible"
#: ../view/error/404.phtml:1
msgid "A 404 error occurred"
msgstr "Une erreur 404 est survenue"
#: ../view/error/404.phtml:10
msgid "The requested controller was unable to dispatch the request."
msgstr "Le contrôleur demandé n'a pas pu dispatcher la requête."
#: ../view/error/404.phtml:13
msgid "The requested controller could not be mapped to an existing controller class."
msgstr "Le contrôleur demandé ne correspond pas à une classe existante de contrôleur."
#: ../view/error/404.phtml:16
msgid "The requested controller was not dispatchable."
msgstr "Le contrôleur demandé n'est pas dispatchable."
#: ../view/error/404.phtml:19
msgid "The requested URL could not be matched by routing."
msgstr "L'URL demandée n'a pas pu trouver de route correspondante."
#: ../view/error/404.phtml:22
msgid "We cannot determine at this time why a 404 was generated."
msgstr "Nous ne pouvons pas déterminer pour le moment pourquoi une 404 a été générée."
#: ../view/error/404.phtml:34
msgid "Controller"
msgstr "Contrôleur"
#: ../view/error/404.phtml:41
#, php-format
msgid "resolves to %s"
msgstr "résout en %s"
#: ../view/error/404.phtml:51
msgid "Exception"
msgstr "Exception"
<?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 Application\Controller;
use Zend\Mvc\Controller\AbstractActionController;
use Zend\View\Model\ViewModel;
class IndexController extends AbstractActionController
{
public function indexAction()
{
return new ViewModel();
}
}
<div class="hero-unit">
<h1><?php echo sprintf($this->translate("Bienvenue dans le squelette d'application Unicaen")) ?></h1>
<p><?php echo sprintf($this->translate("Félicitations! Vous avez insallé avec succès le squelette d'application Unicaen propulsé par %sZend Framework 2%s. La version du framework utilisée est la %s."), '<a href="https://github.com/zendframework/ZendSkeletonApplication" target="_blank">', '</a>', \Zend\Version\Version::VERSION) ?></p>
<p><a class="btn btn-success btn-large" href="<?php echo $this->url('zfcuser/login') ?>"><?php echo $this->translate('Connectez-vous...') ?></a></p>
</div>
<div class="row">
<div class="span4">
<h2><?php echo $this->translate('Follow Development') ?></h2>
<p><?php echo sprintf($this->translate('Zend Framework 2 is under active development. If you are interested in following the development of ZF2, there is a special ZF2 portal on the official Zend Framework website which provides links to the ZF2 %swiki%s, %sdev blog%s, %sissue tracker%s, and much more. This is a great resource for staying up to date with the latest developments!'), '<a href="http://framework.zend.com/wiki/display/ZFDEV2/Home">', '</a>', '<a href="http://framework.zend.com/zf2/blog">', '</a>', '<a href="https://github.com/zendframework/zf2/issues">', '</a>') ?></p>
<p><a class="btn btn-success" href="http://framework.zend.com" target="_blank"><?php echo $this->translate('ZF2 Development Portal') ?> &raquo;</a></p>
</div>
<div class="span4">
<h2><?php echo $this->translate('Discover Modules') ?></h2>
<p><?php echo sprintf($this->translate('The community is working on developing a community site to serve as a repository and gallery for ZF2 modules. The project is available %son GitHub%s. The site is currently live and currently contains a list of some of the modules already available for ZF2.'), '<a href="https://github.com/zendframework/modules.zendframework.com">', '</a>') ?></p>
<p><a class="btn btn-success" href="http://modules.zendframework.com/" target="_blank"><?php echo $this->translate('Explore ZF2 Modules') ?> &raquo;</a></p>
</div>
<div class="span4">
<h2><?php echo $this->translate('Help &amp; Support') ?></h2>
<p><?php echo sprintf($this->translate('If you need any help or support while developing with ZF2, you may reach us via IRC: %s#zftalk on Freenode%s. We\'d love to hear any questions or feedback you may have regarding the beta releases. Alternatively, you may subscribe and post questions to the %smailing lists%s.'), '<a href="irc://irc.freenode.net/zftalk">', '</a>', '<a href="http://framework.zend.com/wiki/display/ZFDEV/Mailing+Lists">', '</a>') ?></p>
<p><a class="btn btn-success" href="http://webchat.freenode.net?channels=zftalk" target="_blank"><?php echo $this->translate('Ping us on IRC') ?> &raquo;</a></p>
</div>
</div>
RewriteEngine On
RewriteBase /unicaen-skeleton-application
# The following rule tells Apache that if the requested filename
# exists, simply serve it.
RewriteCond %{REQUEST_FILENAME} -s [OR]
RewriteCond %{REQUEST_FILENAME} -l [OR]
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule ^.*$ - [NC,L]
# The following rewrites all other queries to index.php. The
# condition ensures that if you are using Apache aliases to do
# mass virtual hosting, the base path will be prepended to
# allow proper resolution of the index.php file; it will work
# in non-aliased environments as well, providing a safe, one-size
# fits all solution.
RewriteCond %{REQUEST_URI}::$1 ^(/.+)(.+)::\2$
RewriteRule ^(.*) - [E=BASE:%1]
RewriteRule ^(.*)$ %{ENV:BASE}index.php [NC,L]
<?php
define('REQUEST_MICROTIME', microtime(true));
/**
* This makes our life easier when dealing with paths. Everything is relative
* to the application root now.
*/
chdir(dirname(__DIR__));
// Setup autoloading
require 'init_autoloader.php';
// Run the application!
Zend\Mvc\Application::init(require 'config/application.config.php')->run();
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment