├── data └── cache │ └── .gitkeep ├── config ├── autoload │ ├── .gitignore │ ├── README.md │ ├── global.php │ ├── local.php.dist │ ├── development.local.php.dist │ └── zend-developer-tools.local-development.php ├── modules.config.php ├── development.config.php.dist └── application.config.php ├── public ├── img │ ├── favicon.ico │ └── zf-logo-mark.svg ├── fonts │ ├── glyphicons-halflings-regular.eot │ ├── glyphicons-halflings-regular.ttf │ ├── glyphicons-halflings-regular.woff │ └── glyphicons-halflings-regular.woff2 ├── .htaccess ├── css │ └── style.css ├── web.config ├── index.php └── js │ ├── bootstrap.min.js │ └── jquery-3.3.1.min.js ├── docker-compose.yml ├── .gitignore ├── phpunit.xml.dist ├── Dockerfile ├── TODO.md ├── module └── Application │ ├── src │ ├── Module.php │ └── Controller │ │ └── IndexController.php │ ├── test │ └── Controller │ │ └── IndexControllerTest.php │ ├── view │ ├── error │ │ ├── index.phtml │ │ └── 404.phtml │ ├── layout │ │ └── layout.phtml │ └── application │ │ └── index │ │ └── index.phtml │ └── config │ └── module.config.php ├── bin └── update-gitignore.php ├── phpcs.xml ├── LICENSE.md ├── Vagrantfile ├── CONDUCT.md ├── CHANGELOG.md ├── composer.json ├── README.md └── CONTRIBUTING.md /data/cache/.gitkeep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /config/autoload/.gitignore: -------------------------------------------------------------------------------- 1 | local.php 2 | *.local.php 3 | -------------------------------------------------------------------------------- /public/img/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zendframework/ZendSkeletonApplication/HEAD/public/img/favicon.ico -------------------------------------------------------------------------------- /docker-compose.yml: -------------------------------------------------------------------------------- 1 | zf: 2 | build: . 3 | dockerfile: Dockerfile 4 | ports: 5 | - "8080:80" 6 | volumes: 7 | - .:/var/www 8 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | .vagrant/ 2 | vendor/ 3 | config/development.config.php 4 | data/cache/* 5 | !data/cache/.gitkeep 6 | phpunit.xml 7 | composer.lock 8 | -------------------------------------------------------------------------------- /public/fonts/glyphicons-halflings-regular.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zendframework/ZendSkeletonApplication/HEAD/public/fonts/glyphicons-halflings-regular.eot -------------------------------------------------------------------------------- /public/fonts/glyphicons-halflings-regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zendframework/ZendSkeletonApplication/HEAD/public/fonts/glyphicons-halflings-regular.ttf -------------------------------------------------------------------------------- /public/fonts/glyphicons-halflings-regular.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zendframework/ZendSkeletonApplication/HEAD/public/fonts/glyphicons-halflings-regular.woff -------------------------------------------------------------------------------- /public/fonts/glyphicons-halflings-regular.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zendframework/ZendSkeletonApplication/HEAD/public/fonts/glyphicons-halflings-regular.woff2 -------------------------------------------------------------------------------- /phpunit.xml.dist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | ./module/Application/test 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /config/autoload/README.md: -------------------------------------------------------------------------------- 1 | About this directory: 2 | ===================== 3 | 4 | By default, this application is configured to load all configs in 5 | `./config/autoload/{,*.}{global,local}.php`. Doing this provides a 6 | location for a developer to drop in configuration override files provided by 7 | modules, as well as cleanly provide individual, application-wide config files 8 | for things like database connections, etc. 9 | -------------------------------------------------------------------------------- /Dockerfile: -------------------------------------------------------------------------------- 1 | FROM php:7.0-apache 2 | 3 | RUN apt-get update \ 4 | && apt-get install -y git zlib1g-dev \ 5 | && docker-php-ext-install zip \ 6 | && a2enmod rewrite \ 7 | && sed -i 's!/var/www/html!/var/www/public!g' /etc/apache2/sites-available/000-default.conf \ 8 | && mv /var/www/html /var/www/public \ 9 | && curl -sS https://getcomposer.org/installer \ 10 | | php -- --install-dir=/usr/local/bin --filename=composer 11 | 12 | WORKDIR /var/www 13 | -------------------------------------------------------------------------------- /config/autoload/global.php: -------------------------------------------------------------------------------- 1 | zf-logo-mark -------------------------------------------------------------------------------- /bin/update-gitignore.php: -------------------------------------------------------------------------------- 1 | 9 | * $ composer development-enable 10 | * 11 | * 12 | * from the project root to copy this file to development.local.php and enable 13 | * the settings it contains. 14 | * 15 | * You may also create files matching the glob pattern `{,*.}{global,local}-development.php`. 16 | */ 17 | 18 | return [ 19 | 'view_manager' => [ 20 | 'display_exceptions' => true, 21 | ], 22 | ]; 23 | -------------------------------------------------------------------------------- /module/Application/src/Controller/IndexController.php: -------------------------------------------------------------------------------- 1 | [ 11 | ], 12 | // Configuration overrides during development mode 13 | 'module_listener_options' => [ 14 | 'config_glob_paths' => [realpath(__DIR__) . '/autoload/{,*.}{global,local}-development.php'], 15 | 'config_cache_enabled' => false, 16 | 'module_map_cache_enabled' => false, 17 | ], 18 | ]; 19 | -------------------------------------------------------------------------------- /public/.htaccess: -------------------------------------------------------------------------------- 1 | RewriteEngine On 2 | # The following rule tells Apache that if the requested filename 3 | # exists, simply serve it. 4 | RewriteCond %{REQUEST_FILENAME} -s [OR] 5 | RewriteCond %{REQUEST_FILENAME} -l [OR] 6 | RewriteCond %{REQUEST_FILENAME} -d 7 | RewriteRule ^.*$ - [L] 8 | # The following rewrites all other queries to index.php. The 9 | # condition ensures that if you are using Apache aliases to do 10 | # mass virtual hosting or installed the project in a subdirectory, 11 | # the base path will be prepended to allow proper resolution of 12 | # the index.php file; it will work in non-aliased environments 13 | # as well, providing a safe, one-size fits all solution. 14 | RewriteCond %{REQUEST_URI}::$1 ^(/.+)/(.*)::\2$ 15 | RewriteRule ^(.*) - [E=BASE:%1] 16 | RewriteRule ^(.*)$ %{ENV:BASE}/index.php [L] 17 | -------------------------------------------------------------------------------- /public/css/style.css: -------------------------------------------------------------------------------- 1 | body { 2 | padding-top: 60px; 3 | padding-bottom: 40px; 4 | } 5 | 6 | .zf-green { 7 | color: #68b604; 8 | } 9 | 10 | .btn-success { 11 | background-color: #57a900; 12 | background-image: -moz-linear-gradient(top, #70d900, #57a900); 13 | background-image: -ms-linear-gradient(top, #70d900, #57a900); 14 | background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#70d900), to(#57a900)); 15 | background-image: -webkit-linear-gradient(top, #70d900, #57a900); 16 | background-image: -o-linear-gradient(top, #70d900, #57a900); 17 | background-image: linear-gradient(top, #70d900, #57a900); 18 | filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#70d900', endColorstr='#57a900', GradientType=0); 19 | } 20 | 21 | .btn-success:hover, 22 | .btn-success:active, 23 | .btn-success.active, 24 | .btn-success.disabled, 25 | .btn-success[disabled] { 26 | background-color: #57a900; 27 | } 28 | 29 | div.container a.navbar-brand > img { 30 | display: inline; 31 | margin-right: 4px; 32 | margin-top: -2px; 33 | } 34 | -------------------------------------------------------------------------------- /phpcs.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | Zend Framework coding standard 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | public/index.php 26 | 27 | 28 | 29 | config 30 | module 31 | public/index.php 32 | 33 | -------------------------------------------------------------------------------- /public/web.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 12 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /public/index.php: -------------------------------------------------------------------------------- 1 | run(); 41 | -------------------------------------------------------------------------------- /LICENSE.md: -------------------------------------------------------------------------------- 1 | Copyright (c) 2005-2016, Zend Technologies USA, Inc. 2 | 3 | All rights reserved. 4 | 5 | Redistribution and use in source and binary forms, with or without modification, 6 | are permitted provided that the following conditions are met: 7 | 8 | - Redistributions of source code must retain the above copyright notice, 9 | this list of conditions and the following disclaimer. 10 | 11 | - Redistributions in binary form must reproduce the above copyright notice, 12 | this list of conditions and the following disclaimer in the documentation 13 | and/or other materials provided with the distribution. 14 | 15 | - Neither the name of Zend Technologies USA, Inc. nor the names of its 16 | contributors may be used to endorse or promote products derived from this 17 | software without specific prior written permission. 18 | 19 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 20 | ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 21 | WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 22 | DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR 23 | ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 24 | (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 25 | LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON 26 | ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 27 | (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 28 | SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 29 | -------------------------------------------------------------------------------- /module/Application/test/Controller/IndexControllerTest.php: -------------------------------------------------------------------------------- 1 | setApplicationConfig(ArrayUtils::merge( 25 | include __DIR__ . '/../../../../config/application.config.php', 26 | $configOverrides 27 | )); 28 | 29 | parent::setUp(); 30 | } 31 | 32 | public function testIndexActionCanBeAccessed() 33 | { 34 | $this->dispatch('/', 'GET'); 35 | $this->assertResponseStatusCode(200); 36 | $this->assertModuleName('application'); 37 | $this->assertControllerName(IndexController::class); // as specified in router's controller name alias 38 | $this->assertControllerClass('IndexController'); 39 | $this->assertMatchedRouteName('home'); 40 | } 41 | 42 | public function testIndexActionViewModelTemplateRenderedWithinLayout() 43 | { 44 | $this->dispatch('/', 'GET'); 45 | $this->assertQuery('.container .jumbotron'); 46 | } 47 | 48 | public function testInvalidRouteDoesNotCrash() 49 | { 50 | $this->dispatch('/invalid/route', 'GET'); 51 | $this->assertResponseStatusCode(404); 52 | } 53 | } 54 | -------------------------------------------------------------------------------- /Vagrantfile: -------------------------------------------------------------------------------- 1 | # -*- mode: ruby -*- 2 | # vi: set ft=ruby : 3 | 4 | VAGRANTFILE_API_VERSION = '2' 5 | 6 | @script = <