diff --git a/module/Application/config/module.config.php b/module/Application/config/module.config.php index 8fb7661..36cc57c 100644 --- a/module/Application/config/module.config.php +++ b/module/Application/config/module.config.php @@ -57,6 +57,9 @@ return [ 'doctype' => 'HTML5', 'not_found_template' => 'error/404', 'exception_template' => 'error/index', + 'strategies' => [ + 'Smarty\View\Strategy' + ], 'template_map' => [ 'layout/layout' => __DIR__ . '/../view/layout/layout.tpl', 'application/index/index' => __DIR__ . '/../view/application/index/index.tpl', diff --git a/module/Application/view/layout/layout.tpl b/module/Application/view/layout/layout.tpl index d5a1fb4..358bfe2 100644 --- a/module/Application/view/layout/layout.tpl +++ b/module/Application/view/layout/layout.tpl @@ -31,7 +31,544 @@ - {$content} + + + + +
+
+ + +
+ + + +
+ + +
+
+ + + + +
+
+
+
+
+ +

Nicolas Riault

+

Web Developer Full Stack, Consultant IT

+ + +
+
+
+
+
+ + + +
+
+
+
+
+

Bonjour, je m'appelle Nicolas

+

+ Ouvert et curieux de caractère, je suis à l’aise dans la relation client et apprécie le travail + en équipe. + J’aime ce travail de développeur qui nécessite une capacité d’adaptation et d’écoute au service + d’un projet. +
+ Du point de vue technique, je développe principalement en PHP, C#. Je suis également a l'aise + avec SQL Server et la solution MSBI. +
+ Sur mon temps libre je travaille sur des projets personnels que j'autilise au quotidien en + utilisant de nouvelles technologies (AngularJs, Ionic ... ). +

+
    + + +
  • + +
  • +
  • +
  • +
  • +
+
+
+
+
+
+

Cursus et certifications

+
+

SQL Server 2014 Performance Tuning and Optimization

+

2017 - IB Formation - Paris

+
+
+

Licence Professionelle logiciel libre et propriétaire

+

2012 - UFR Des Sciences - Angers

+
+
+

BTS Informatique de Gestion

+

2011 - Lycée Chevrollier - Angers

+
+
+

Lycée Notre Dame

+

2009 - Baccalauréat Scientifique - La Flèche

+
+
+
+
+
+
+
+ + + +
+
+
+

Mes Compétences

+
+
+
+
+
+

Développement

+ +
+

PHP

+
+
+
+
+
+
+ +
+

Javascript

+
+
+
+
+
+
+ +
+

HTML / CSS

+
+
+
+
+
+
+ +
+

.NET / C#

+
+
+
+
+
+
+
+
+
+
+
+
+

SGBD / Business intelligence

+ +
+

SQL Server

+
+
+
+
+
+
+ +
+

Microsoft BI

+
+
+
+
+
+
+ +
+

MySQL

+
+
+
+
+
+
+ +
+

PostgreSQL

+
+
+
+
+
+
+
+
+
+
+
+ +
+
+
+

Autres

+ +
+

MongoDb / CassandraDb

+
+
+
+
+
+
+ +
+

Python

+
+
+
+
+
+
+ +
+

NodeJs

+
+
+
+
+
+
+ +
+

AngularJS

+
+
+
+
+
+
+ +
+

Ionic Framework

+
+
+
+
+
+
+
+
+
+
+
+
+ + + +
+
+
+

Mes Experiences

+
+
+
+
+

Développeur Full Stack - Serveurcom

+
12/2015 - Actuel
+

+ Maintenance évolutive d'une application de facturation pour les télécoms. +
+ Macro gestion de l'équipe de développement. +
+ Formation Microsoft 55144B. +

+ Détail +
+
+ +
+
+
+

Consultant SI - Capgémini

+
02/2013 - 11/2015
+

+ Développeur référent pour une TMA pour le groupe La Poste. +
+ PHP(CakePhp), MSBI/Asp.NET ( SSAS, SSRS, SSIS) +
+ TMA pour le ministère des sports. +
+ .NET/MSBI +
+ TMA pour l'Agence nationale de la recherche. +
+ C#, ASP, Sharepoint +
+

+ Détail + + +
+ +
+ +
+
+
+
04/2012 - 11/2012
+

Développeur - INRA

+

+ Développement d'une application web pour informatiser le métier des chercheurs. +
+ Qooxdoo, Python, PostgreSQL +

+
+
+ +
+
+
+

Développeur Web - Archimède

+
06/2011 - 07/2011
+

Developpement d'un site vitrine sous Joomla

+
+
+
+
+ + +{* +
+
+
+

Mes Engagements

+
+ + +
+
+
+ +

Web Development

+
+
+
+
+ +

Web Design

+
+
+
+
+ +

Responsif

+
+
+ +
+
+ +

Documentation

+

+ Analyse du besoin, qualification, chiffrage, rédaction des spécifications et des cahiers de + test. +

+
+
+
+
+ +

Clean Coder

+

+ Adepte du manifeste "Software craftsmanship manifesto". +
+ + Pas seulement une application qui marche, mais une application bien faite, perreine, + robuste, maintenable et évolutive. + +

+
+
+
+
+ +

Support

+

Gestion du SAV, priorisation des tickets.

+
+
+
+ +
+
+*} + + + +
+
+
+

Contactez Moi

+
+ +
+
+
+ +
+ +
+

Numéro :

+

+33637290170

+
+
+ +
+ +
+

Email :

+

nicolas.riault@gmail.com

+
+
+ +
+ +
+

+ Addresse : +

+

+ 90 boulevard de la butte + 72230 - Mulsanne +

+
+
+
+
+ +
+
+
+ Nom
+ +
+
+ Email
+ +
+
+ Sujet
+ +
+
+ Message
+ +
+
+ +
+
+
+ +
+
+
+ + + + + + + @@ -43,7 +580,7 @@ - +view_manager diff --git a/module/Smarty/.gitignore b/module/Smarty/.gitignore deleted file mode 100644 index 3ccc23f..0000000 --- a/module/Smarty/.gitignore +++ /dev/null @@ -1,7 +0,0 @@ -.idea -vendor -composer.lock -composer.phar -phpunit.xml -phpmd.xml -phpdox.xml diff --git a/module/Smarty/LICENSE b/module/Smarty/LICENSE deleted file mode 100644 index b8eb49b..0000000 --- a/module/Smarty/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -The MIT License (MIT) - -Copyright (c) 2016 skillfish - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. diff --git a/module/Smarty/README.md b/module/Smarty/README.md deleted file mode 100644 index df59e9b..0000000 --- a/module/Smarty/README.md +++ /dev/null @@ -1,88 +0,0 @@ -# zf3-smarty-module -Based on https://github.com/randlem/zf2-smarty-module and modified for use with ZF3 - -# Installation -Although you could just clone this repository, it is highly recommended to install the module via composer. -- run `php composer.phar require skillfish/zf3-smarty-module` -- add Smarty to your ZF3 modules Configuration e.g /config/modules.config.php -- change the View Manager Strategy to Smarty in your module or apllication config like: -```php - [ - 'strategies' => [ - 'Smarty\View\Strategy' - ], - ], -]; -``` -you might also want to change your View Manager's Template Map to actually use .tpl files instead of the default .phtml -```php - [ - 'template_map' => [ - 'layout/layout' => '/module/Application/view/layout/layout.tpl', - 'application/index/index' => '/module/Application/view/application/index/index.tpl', - 'error/404' => '/module/Application/view/error/404.tpl', - 'error/index' => '/module/Applicationview/error/index.tpl', - ], - ], -]; -``` -# Template Inheritance -In order for template inheritance to work, you must terminate your ViewModel inside your Controller with `$viewModel->setTerminal(true);` and make use of the smarty `{extends}` tag. Otherwise the ViewModel will render the default layout template and inheritance won't work. - -### Example - -layout.tpl -```html - - - {block 'title'}Page name{/block} - - - {block 'content'}{/block} - - -``` -index.tpl -```html -{extends 'layout.tpl'} -{block 'title' append} - Index{/block} -{block 'content'}This is the index template{/block} -``` -Controller -```php -public function indexAction() -{ - $viewModel = new ViewModel(); - $viewModel->setTerminal(true); - return $viewModel; -} -``` - -will result in -```html - - - Page name - Index - - - This is the index template - - -``` - -# Requirements -The composer module currently requires: -```json -"require": { - "php": ">5.4", - "smarty/smarty": "~3.1.29", - "zendframework/zend-stdlib": "~3.0.1", - "zendframework/zend-mvc": "~3.0.1", - "zendframework/zend-servicemanager": "~3.1", - "zendframework/zend-modulemanager": "~2.7.1" -}, -``` diff --git a/module/Smarty/composer.json b/module/Smarty/composer.json deleted file mode 100644 index 9031e14..0000000 --- a/module/Smarty/composer.json +++ /dev/null @@ -1,30 +0,0 @@ -{ - "name": "skillfish/zf3-smarty-module", - "description": "Zend Framework 3 Module for integrating Smarty 3 as View Manager", - "type": "library", - "license": "MIT", - "keywords": [ - "smarty", - "module", - "zf3" - ], - "authors": [ - { - "name": "Heiko Baumgärtner", - "email": "skillfish@gmail.com" - } - ], - "require": { - "php": ">5.4", - "smarty/smarty": "^3.1", - "zendframework/zend-stdlib": "^3.0", - "zendframework/zend-mvc": "^3.0", - "zendframework/zend-servicemanager": "^3.1", - "zendframework/zend-modulemanager": "^2.7" - }, - "autoload": { - "psr-4": { - "Smarty\\": "src/" - } - } -} diff --git a/module/Smarty/config/module.config.php b/module/Smarty/config/module.config.php deleted file mode 100644 index 4dcb658..0000000 --- a/module/Smarty/config/module.config.php +++ /dev/null @@ -1,60 +0,0 @@ - [ - 'strategies' => [ - Strategy::class, - ], - ], - 'service_manager' => [ - 'factories' => [ - Strategy::class => StrategyFactory::class, - Renderer::class => RendererFactory::class, - PluginManager::class => PluginManagerFactory::class, - ], - 'delegators' => [ - Renderer::class => [ - PluginDelegator::class, - ], - ], - ], - 'smarty' => [ - 'suffix' => 'tpl', - 'compile_dir' => getcwd() . '/data/smarty/templates_c', - 'config_file' => getcwd() . '/config/autoload/smarty.conf', - 'escape_html' => true, - 'caching' => false, - 'cache_dir' => getcwd() . '/data/smarty/cache', - 'plugins_dir' => getcwd() . '/data/smarty/plugins', - 'plugins' => [ - // Plugin manager configuration. - 'manager' => [ - ], - // Plugins. - // For example (MyFuncPlugin should be added in Plugin manager): - // 'functions' => [ - // 'my_func' => MyFuncPlugin::class, - // ] - // This config register MyFuncPlugin with "my_func" name in Smarty. - 'functions' => [ - ], - 'modifiers' => [ - ], - 'blocks' => [ - ], - 'if_blocks' => [ - ], - 'cycle_blocks' => [ - ], - ], - ], -]; diff --git a/module/Smarty/src/Exception/InvalidServiceException.php b/module/Smarty/src/Exception/InvalidServiceException.php deleted file mode 100644 index c11f56f..0000000 --- a/module/Smarty/src/Exception/InvalidServiceException.php +++ /dev/null @@ -1,8 +0,0 @@ -get('Configuration'); - $pluginsConfig = $config['smarty']['plugins']; - - $renderer = call_user_func($callback); - $this->smarty = $renderer->getEngine(); - $this->pluginManager = $container->get(PluginManager::class); - - $this->registerFunctionPlugins($pluginsConfig['functions']); - $this->registerModifierPlugins($pluginsConfig['modifiers']); - $this->registerBlockPlugins($pluginsConfig['blocks']); - $this->registerIfBlockPlugins($pluginsConfig['if_blocks']); - $this->registerCycleBlockPlugins($pluginsConfig['cycle_blocks']); - - return $renderer; - } - - /** - * @param array $pluginsConfig - * @param string $expectedInstance - * - * @throws InvalidServiceException - * - * @return PluginInterface[] - */ - protected function getPlugins(array $pluginsConfig, $expectedInstance) - { - $plugins = []; - foreach ($pluginsConfig as $name => $pluginClass) { - $plugin = $this->pluginManager->build($pluginClass, ['name' => $name]); - if (!$plugin instanceOf $expectedInstance) { - throw new InvalidServiceException(sprintf( - 'Plugin delegator "%s" expected an instance of type "%s", but "%s" was received', - __CLASS__, - $expectedInstance, - is_object($plugin) ? get_class($plugin) : gettype($plugin) - )); - } - $plugins[$name] = $plugin; - } - return $plugins; - } - - public function registerFunctionPlugins(array $plugins) - { - foreach ($this->getPlugins($plugins, FunctionPluginInterface::class) as $name => $plugin) { - $this->smarty->registerPlugin('function', $name, [$plugin, 'run']); - } - } - - public function registerModifierPlugins(array $plugins) - { - foreach ($this->getPlugins($plugins, ModifierPluginInterface::class) as $name => $plugin) { - $this->smarty->registerPlugin('modifier', $name, [$plugin, 'modify']); - } - } - - public function registerBlockPlugins(array $plugins) - { - foreach ($this->getPlugins($plugins, BlockPluginInterface::class) as $name => $plugin) { - $this->smarty->registerPlugin('block', $name, [$plugin, 'prepare']); - } - } - - public function registerIfBlockPlugins(array $plugins) - { - foreach ($this->getPlugins($plugins, IfBlockPluginInterface::class) as $name => $plugin) { - $proxy = new IfBlockProxy($plugin, $name); - $this->smarty->registerPlugin('block', $name, [$proxy, '__invoke']); - $this->smarty->registerPlugin('function', $name . '_else', [$proxy, 'elseFunction']); - } - } - - public function registerCycleBlockPlugins(array $plugins) - { - foreach ($this->getPlugins($plugins, CycleBlockPluginInterface::class) as $name => $plugin) { - $proxy = new CycleBlockProxy($plugin); - $this->smarty->registerPlugin('block', $name, [$proxy, '__invoke']); - } - } -} diff --git a/module/Smarty/src/Service/PluginManager.php b/module/Smarty/src/Service/PluginManager.php deleted file mode 100644 index 71f5097..0000000 --- a/module/Smarty/src/Service/PluginManager.php +++ /dev/null @@ -1,10 +0,0 @@ -get('Configuration'); - $config = $config['smarty']['plugins']; - return new PluginManager($container, $config['manager']); - } -} diff --git a/module/Smarty/src/Service/PluginProxy/CycleBlockProxy.php b/module/Smarty/src/Service/PluginProxy/CycleBlockProxy.php deleted file mode 100644 index 735f791..0000000 --- a/module/Smarty/src/Service/PluginProxy/CycleBlockProxy.php +++ /dev/null @@ -1,33 +0,0 @@ -plugin = $plugin; - } - - public function __invoke(array $params, $content, $smarty, &$repeat) - { - if (is_null($content)) { - return $this->plugin->init($params, $smarty); - } - if (!$this->plugin->isValid($params, $smarty)) { - $repeat = false; - return $this->plugin->end($params, $smarty); - } - $repeat = true; - return $this->plugin->prepareIteration($params, $content, $smarty); - } -} diff --git a/module/Smarty/src/Service/PluginProxy/IfBlockProxy.php b/module/Smarty/src/Service/PluginProxy/IfBlockProxy.php deleted file mode 100644 index 7b9dbe9..0000000 --- a/module/Smarty/src/Service/PluginProxy/IfBlockProxy.php +++ /dev/null @@ -1,46 +0,0 @@ -plugin = $plugin; - $this->name = $name; - } - - public function __invoke(array $params, $content, $smarty, &$repeat) - { - $trueFalseBlockContents = explode(sprintf('{%s_else}', $this->name), $content); - if (!isset($trueFalseBlockContents[1])) { - $trueFalseBlockContents[1] = ''; - } - - if (!$this->plugin->checkCondition($params, $smarty)) { - return $this->plugin->prepareFalse($params, $trueFalseBlockContents[1], $smarty); - } - - return $this->plugin->prepareTrue($params, $trueFalseBlockContents[0], $smarty); - } - - public function elseFunction(array $params, $smarty) - { - return $smarty->left_delimiter . $this->name . '_else' . $smarty->right_delimiter; - } -} diff --git a/module/Smarty/src/Service/RendererFactory.php b/module/Smarty/src/Service/RendererFactory.php deleted file mode 100644 index cd60dca..0000000 --- a/module/Smarty/src/Service/RendererFactory.php +++ /dev/null @@ -1,43 +0,0 @@ -get('Configuration'); - $config = $config['smarty']; - - /** @var $pathResolver \Zend\View\Resolver\TemplatePathStack */ - $pathResolver = clone $container->get('ViewTemplatePathStack'); - $pathResolver->setDefaultSuffix($config['suffix']); - - /** @var $resolver \Zend\View\Resolver\AggregateResolver */ - $resolver = $container->get('ViewResolver'); - $resolver->attach($pathResolver); - - $engine = new Smarty(); - $engine->setCompileDir($config['compile_dir']); - $engine->setEscapeHtml($config['escape_html']); - $engine->setTemplateDir($pathResolver->getPaths()->toArray()); - $engine->setCaching($config['caching']); - $engine->setCacheDir($config['cache_dir']); - $engine->addPluginsDir($config['plugins_dir']); - - if (file_exists($config['config_file'])) { - $engine->configLoad($config['config_file']); - } - - $renderer = new Renderer(); - $renderer->setEngine($engine); - $renderer->setSuffix($config['suffix']); - $renderer->setResolver($resolver); - - return $renderer; - } -} diff --git a/module/Smarty/src/Service/StrategyFactory.php b/module/Smarty/src/Service/StrategyFactory.php deleted file mode 100644 index b4e0735..0000000 --- a/module/Smarty/src/Service/StrategyFactory.php +++ /dev/null @@ -1,17 +0,0 @@ -get(Renderer::class); - $strategy = new Strategy($renderer); - return $strategy; - } -} diff --git a/module/Smarty/src/View/Renderer.php b/module/Smarty/src/View/Renderer.php deleted file mode 100644 index 79ba4de..0000000 --- a/module/Smarty/src/View/Renderer.php +++ /dev/null @@ -1,99 +0,0 @@ -engine = $engine; - $this->engine->assign('this', $this); - } - - public function getEngine() - { - return $this->engine; - } - - public function setResolver(ResolverInterface $resolver) - { - $this->resolver = $resolver; - } - - public function render($nameOrModel, $values = null) - { - if ($nameOrModel instanceof ModelInterface) { - $model = $nameOrModel; - $nameOrModel = $nameOrModel->getTemplate(); - if (empty($nameOrModel)) { - throw new DomainException(sprintf( - '%s: recieved View Model argument, but template is empty.', - __METHOD__ - )); - } - $values = $model->getVariables(); - unset($model); - } - if (!($file = $this->resolver->resolve($nameOrModel))) { - throw new DomainException(sprintf( - 'Unable to find template "%s"', - $nameOrModel - )); - } - - if ($values instanceof ArrayObject) { - $values = $values->getArrayCopy(); - } - - $smarty = $this->getEngine(); - $smarty->clearAllAssign(); - $smarty->assign($values); - - $content = $smarty->fetch($file); - - return $content; - } - - public function canRender($nameOrModel) - { - if ($nameOrModel instanceof ModelInterface) { - $nameOrModel = $nameOrModel->getTemplate(); - } - $tpl = $this->resolver->resolve($nameOrModel); - $ext = pathinfo($tpl, PATHINFO_EXTENSION); - if ($tpl && $ext == $this->getSuffix()) { - return true; - } - return false; - } - - public function setSuffix($suffix) - { - $this->suffix = $suffix; - } - - public function getSuffix() - { - return $this->suffix; - } -} diff --git a/module/Smarty/src/View/Strategy.php b/module/Smarty/src/View/Strategy.php deleted file mode 100644 index a70125f..0000000 --- a/module/Smarty/src/View/Strategy.php +++ /dev/null @@ -1,57 +0,0 @@ -renderer = $renderer; - } - - public function attach(EventManagerInterface $events, $priority = 100) - { - $this->listeners[] = $events->attach(ViewEvent::EVENT_RENDERER, [$this, 'selectRenderer'], $priority); - $this->listeners[] = $events->attach(ViewEvent::EVENT_RESPONSE, [$this, 'injectResponse'], $priority); - } - - public function detach(EventManagerInterface $events) - { - foreach ($this->listeners as $index => $listener) { - $events->detach($listener); - unset($this->listeners[$index]); - } - } - - public function selectRenderer(ViewEvent $e) - { - if (!$this->renderer->canRender($e->getModel())) { - return false; - } - return $this->renderer; - } - - public function injectResponse(ViewEvent $e) - { - $renderer = $e->getRenderer(); - if ($renderer !== $this->renderer) { - return false; - } - $result = $e->getResult(); - $response = $e->getResponse(); - $response->setContent($result); - } -}