matthew / ConfigProvider.php

0 вподобань
0 форк(-ів)
4 файл(-ів)
Остання активність 1 month ago
An example of attaching a delegator factory to the Mezzio RouteCollectorInterface to automate route registration.
1 <?php
2
3 namespace SomeModule;
4
5 use Laminas\Stdlib\ArrayUtils\MergeRemoveKey;
6 use Mezzio\Router\RouteCollectorInterface;
7
8 class ConfigProvider
9 {
10 public function __invoke(): array

matthew / deploy.sh

0 вподобань
0 форк(-ів)
1 файл(-ів)
Остання активність 1 year ago
This is a script I use on my host for deploying a website; it includes the ability to rollback if anything fails. I have my github action call this file with the repo name and sha in order to deploy a given site.
1 #!/bin/bash
2
3 set -e
4
5 deploy() {
6 local release_path="$1"
7
8 cd "${release_path}"
9 if [ -f "${release_path}/.deploy/deploy.sh" ]; then
10 /bin/bash .deploy/deploy.sh

matthew / zend-eventmanager short-circuiting listener

0 вподобань
0 форк(-ів)
1 файл(-ів)
Остання активність 1 year ago
Example of a short-circuiting event listener in Zend Framework
1 <?php
2
3 // In a module class somewhere...
4 use Zend\EventManager\LazyListener;
5 use Zend\Mvc\MvcEvent;
6
7 class Module
8 {
9 public function onBootstrap(MvcEvent $e)
10 {

matthew / Stratigility Microframework

0 вподобань
0 форк(-ів)
2 файл(-ів)
Остання активність 1 year ago
An example of how you can write a simple one script framework for a website using PSR-15.
1 {
2 "require": {
3 "laminas/laminas-stratigility": "^3.2",
4 "mezzio/mezzio-fastroute": "^3.0",
5 "laminas/laminas-diactoros": "^2.3",
6 "laminas/laminas-httphandlerrunner": "^1.2"
7 }
8 }
Новіше Пізніше