[
  {
    "path": ".dockerignore",
    "content": "nbproject\n._*\n.~lock.*\n.buildpath\n.DS_Store\n.idea\n.project\n.settings\nvendor/\npublic/vendor/\nconfig/development.config.php\nconfig/autoload/local.php\nconfig/autoload/*.local.php\n!public/vendor/README.md\ndata/cache/*\n!data/cache/.gitkeep\n"
  },
  {
    "path": ".gitignore",
    "content": ".vagrant/\nvendor/\nconfig/development.config.php\ndata/cache/*\n!data/cache/.gitkeep\nphpunit.xml\n"
  },
  {
    "path": "CHANGELOG.md",
    "content": "# Changelog\n\nAll notable changes to this project will be documented in this file, in reverse chronological order by release.\n\n## 1.5.3 - TBD\n\n### Added\n\n- Nothing.\n\n### Changed\n\n- Nothing.\n\n### Deprecated\n\n- Nothing.\n\n### Removed\n\n- Nothing.\n\n### Fixed\n\n- Nothing.\n\n## 1.5.2 - 2019-01-09\n\n### Added\n\n- Nothing.\n\n### Changed\n\n- Nothing.\n\n### Deprecated\n\n- Nothing.\n\n### Removed\n\n- Nothing.\n\n### Fixed\n\n- [#168](https://github.com/zfcampus/zf-apigility-skeleton/pull/168) fixes file permissions of the `/var/www` folder when using Vagrant,\n  setting them to the `www-data` user.\n\n## 1.5.1 - 2018-08-15\n\n### Added\n\n- Nothing.\n\n### Changed\n\n- Nothing.\n\n### Deprecated\n\n- Nothing.\n\n### Removed\n\n- Nothing.\n\n### Fixed\n\n- [#165](https://github.com/zfcampus/zf-apigility-skeleton/pull/165) updates the `composer.lock` by running `composer install` using a\n  PHP 5.6 release.  This was done as the 1.5.0 release was made using a PHP 7.1+\n  binary, and thus installed versions of dependencies that were compatible with\n  those release - but not with 5.6.  Once a release is made with this patch,\n  users on PHP 5.6 will be able to install the skeleton again.\n  \n  However, this means that PHP 7.1+ users will need to execute the following\n  after an initial skeleton install in order to get newer versions of libraries\n  compatible with 7.1:\n  \n  ```bash\n  $ rm -Rf composer.lock vendor\n  $ composer install\n  ```\n\n## 1.5.0 - 2018-05-08\n\n### Added\n\n- [#159](https://github.com/zfcampus/zf-apigility-skeleton/pull/159) adds a development requirement on zendframework/zend-test, ensuring users\n  have the ability to run existing unit tests, as well as write and execute new ones out of the box.\n\n### Changed\n\n- [#164](https://github.com/zfcampus/zf-apigility-skeleton/pull/164) updates all dependencies to versions that will work with PHP 7.2, where possible.\n\n- [#154](https://github.com/zfcampus/zf-apigility-skeleton/pull/154) modifies the `config/autoload/.gitignore` rules to omit `*.local-development.php` files.\n\n### Deprecated\n\n- Nothing.\n\n### Removed\n\n- Nothing.\n\n### Fixed\n\n- Nothing.\n"
  },
  {
    "path": "CODE_OF_CONDUCT.md",
    "content": "# Contributor Code of Conduct\n\nThis project adheres to [The Code Manifesto](http://codemanifesto.com)\nas its guidelines for contributor interactions.\n\n## The Code Manifesto\n\nWe want to work in an ecosystem that empowers developers to reach their\npotential — one that encourages growth and effective collaboration. A space that\nis safe for all.\n\nA space such as this benefits everyone that participates in it. It encourages\nnew developers to enter our field. It is through discussion and collaboration\nthat we grow, and through growth that we improve.\n\nIn the effort to create such a place, we hold to these values:\n\n1. **Discrimination limits us.** This includes discrimination on the basis of\n   race, gender, sexual orientation, gender identity, age, nationality, technology\n   and any other arbitrary exclusion of a group of people.\n2. **Boundaries honor us.** Your comfort levels are not everyone’s comfort\n   levels. Remember that, and if brought to your attention, heed it.\n3. **We are our biggest assets.** None of us were born masters of our trade.\n   Each of us has been helped along the way. Return that favor, when and where\n   you can.\n4. **We are resources for the future.** As an extension of #3, share what you\n   know. Make yourself a resource to help those that come after you.\n5. **Respect defines us.** Treat others as you wish to be treated. Make your\n   discussions, criticisms and debates from a position of respectfulness. Ask\n   yourself, is it true? Is it necessary? Is it constructive? Anything less is\n   unacceptable.\n6. **Reactions require grace.** Angry responses are valid, but abusive language\n   and vindictive actions are toxic. When something happens that offends you,\n   handle it assertively, but be respectful. Escalate reasonably, and try to\n   allow the offender an opportunity to explain themselves, and possibly correct\n   the issue.\n7. **Opinions are just that: opinions.** Each and every one of us, due to our\n   background and upbringing, have varying opinions. The fact of the matter, is\n   that is perfectly acceptable. Remember this: if you respect your own\n   opinions, you should respect the opinions of others.\n8. **To err is human.** You might not intend it, but mistakes do happen and\n   contribute to build experience. Tolerate honest mistakes, and don't hesitate\n   to apologize if you make one yourself.\n"
  },
  {
    "path": "CONTRIBUTING.md",
    "content": "# CONTRIBUTING\n\n## RESOURCES\n\nIf you wish to contribute to this project, please be sure to\nread/subscribe to the following resources:\n\n - [Coding Standards](https://github.com/zendframework/zend-coding-standard)\n - [Forums](https://discourse.zendframework.com/c/contributors)\n - [Chat](https://zendframework-slack.herokuapp.com)\n - [Code of Conduct](CODE_OF_CONDUCT.md)\n\nIf you are working on new features or refactoring\n[create a proposal](https://github.com/zfcampus/zf-api-problem/issues/new).\n\n## RUNNING TESTS\n\nTo run tests:\n\n- Clone the repository:\n\n  ```console\n  $ git clone git://github.com/zfcampus/zf-api-problem.git\n  $ cd zf-api-problem\n  ```\n\n- Install dependencies via composer:\n\n  ```console\n  $ composer install\n  ```\n\n  If you don't have `composer` installed, please download it from https://getcomposer.org/download/\n\n- Make sure that `zendframework/zend-test` is installed:\n  \n  ```console\n  $ composer require --dev zendframework/zend-test\n  ```\n\n- Run the tests using the \"test\" command shipped in the `composer.json`:\n\n  ```console\n  $ composer test\n  ```\n\nYou can turn on conditional tests with the `phpunit.xml` file.\nTo do so:\n\n -  Copy `phpunit.xml.dist` file to `phpunit.xml`\n -  Edit `phpunit.xml` to enable any specific functionality you\n    want to test, as well as to provide test values to utilize.\n\n## Running Coding Standards Checks\n\nFirst, ensure you've installed dependencies via composer, per the previous\nsection on running tests.\n\nMake sure that `squizlabs/php_codesniffer` is installed:\n\n```console\n$ composer require --dev squizlabs/php_codesniffer\n```\n\nTo run CS checks only:\n\n```console\n$ composer cs-check\n```\n\nTo attempt to automatically fix common CS issues:\n\n```console\n$ composer cs-fix\n```\n\nIf the above fixes any CS issues, please re-run the tests to ensure\nthey pass, and make sure you add and commit the changes after verification.\n\n## Recommended Workflow for Contributions\n\nYour first step is to establish a public repository from which we can\npull your work into the master repository. We recommend using\n[GitHub](https://github.com), as that is where the component is already hosted.\n\n1. Setup a [GitHub account](https://github.com/), if you haven't yet\n2. Fork the repository (https://github.com/zfcampus/zf-api-problem)\n3. Clone the canonical repository locally and enter it.\n\n   ```console\n   $ git clone git://github.com/zfcampus/zf-api-problem.git\n   $ cd zf-api-problem\n   ```\n\n4. Add a remote to your fork; substitute your GitHub username in the command\n   below.\n\n   ```console\n   $ git remote add {username} git@github.com:{username}/zf-api-problem.git\n   $ git fetch {username}\n   ```\n\n### Keeping Up-to-Date\n\nPeriodically, you should update your fork or personal repository to\nmatch the canonical ZF repository. Assuming you have setup your local repository\nper the instructions above, you can do the following:\n\n\n```console\n$ git checkout master\n$ git fetch origin\n$ git rebase origin/master\n# OPTIONALLY, to keep your remote up-to-date -\n$ git push {username} master:master\n```\n\nIf you're tracking other branches -- for example, the \"develop\" branch, where\nnew feature development occurs -- you'll want to do the same operations for that\nbranch; simply substitute  \"develop\" for \"master\".\n\n### Working on a patch\n\nWe recommend you do each new feature or bugfix in a new branch. This simplifies\nthe task of code review as well as the task of merging your changes into the\ncanonical repository.\n\nA typical workflow will then consist of the following:\n\n1. Create a new local branch based off either your master or develop branch.\n2. Switch to your new local branch. (This step can be combined with the\n   previous step with the use of `git checkout -b`.)\n3. Do some work, commit, repeat as necessary.\n4. Push the local branch to your remote repository.\n5. Send a pull request.\n\nThe mechanics of this process are actually quite trivial. Below, we will\ncreate a branch for fixing an issue in the tracker.\n\n```console\n$ git checkout -b hotfix/9295\nSwitched to a new branch 'hotfix/9295'\n```\n\n... do some work ...\n\n\n```console\n$ git commit\n```\n\n... write your log message ...\n\n\n```console\n$ git push {username} hotfix/9295:hotfix/9295\nCounting objects: 38, done.\nDelta compression using up to 2 threads.\nCompression objects: 100% (18/18), done.\nWriting objects: 100% (20/20), 8.19KiB, done.\nTotal 20 (delta 12), reused 0 (delta 0)\nTo ssh://git@github.com/{username}/zf-api-problem.git\n   b5583aa..4f51698  HEAD -> master\n```\n\nTo send a pull request, you have two options.\n\nIf using GitHub, you can do the pull request from there. Navigate to\nyour repository, select the branch you just created, and then select the\n\"Pull Request\" button in the upper right. Select the user/organization\n\"zfcampus\" (or whatever the upstream organization is) as the recipient.\n\n#### What branch to issue the pull request against?\n\nWhich branch should you issue a pull request against?\n\n- For fixes against the stable release, issue the pull request against the\n  \"master\" branch.\n- For new features, or fixes that introduce new elements to the public API (such\n  as new public methods or properties), issue the pull request against the\n  \"develop\" branch.\n\n### Branch Cleanup\n\nAs you might imagine, if you are a frequent contributor, you'll start to\nget a ton of branches both locally and on your remote.\n\nOnce you know that your changes have been accepted to the master\nrepository, we suggest doing some cleanup of these branches.\n\n-  Local branch cleanup\n\n   ```console\n   $ git branch -d <branchname>\n   ```\n\n-  Remote branch removal\n\n   ```console\n   $ git push {username} :<branchname>\n   ```\n"
  },
  {
    "path": "Dockerfile",
    "content": "#\n# Use this dockerfile to run apigility.\n#\n# Start the server using docker-compose:\n#\n#   docker-compose build\n#   docker-compose up\n#\n# You can install dependencies via the container:\n#\n#   docker-compose run apigility composer install\n#\n# You can manipulate dev mode from the container:\n#\n#   docker-compose run apigility composer development-enable\n#   docker-compose run apigility composer development-disable\n#   docker-compose run apigility composer development-status\n#\n# OR use plain old docker \n#\n#   docker build -f Dockerfile-dev -t apigility .\n#   docker run -it -p \"8080:80\" -v $PWD:/var/www apigility\n#\nFROM php:7.2-apache\n\nRUN apt-get update \\\n && apt-get install -y git zlib1g-dev \\\n && docker-php-ext-install zip \\\n && a2enmod rewrite \\\n && sed -i 's!/var/www/html!/var/www/public!g' /etc/apache2/sites-available/000-default.conf \\\n && mv /var/www/html /var/www/public \\\n && curl -sS https://getcomposer.org/installer \\\n  | php -- --install-dir=/usr/local/bin --filename=composer \\\n && echo \"AllowEncodedSlashes On\" >> /etc/apache2/apache2.conf\n\nWORKDIR /var/www\n"
  },
  {
    "path": "LICENSE.md",
    "content": "Copyright (c) 2013-2018, Zend Technologies USA, Inc.\nAll rights reserved.\n\nRedistribution and use in source and binary forms, with or without modification,\nare permitted provided that the following conditions are met:\n\n- Redistributions of source code must retain the above copyright notice, this\n  list of conditions and the following disclaimer.\n\n- Redistributions in binary form must reproduce the above copyright notice, this\n  list of conditions and the following disclaimer in the documentation and/or\n  other materials provided with the distribution.\n\n- Neither the name of Zend Technologies USA, Inc. nor the names of its\n  contributors may be used to endorse or promote products derived from this\n  software without specific prior written permission.\n\nTHIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\" AND\nANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\nWARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE\nDISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR\nANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES\n(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;\nLOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON\nANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS\nSOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n"
  },
  {
    "path": "README.md",
    "content": "Apigility Skeleton Application\n==============================\n\n> ## Repository abandoned 2019-12-31\n>\n> This repository has moved to [laminas-api-tools/api-tools-skeleton](https://github.com/laminas-api-tools/api-tools-skeleton).\n\nRequirements\n------------\n\nPlease see the [composer.json](composer.json) file.\n\nInstallation\n------------\n\n### Via release tarball\n\nGrab the latest release via the [Apigility website](http://apigility.org/)\nand/or the [releases page](https://github.com/zfcampus/zf-apigility-skeleton/releases); each release\nhas distribution tarballs and zipballs available.\n\nUntar it:\n\n```bash\n$ tar xzf zf-apigility-skeleton-{version}.tgz\n```\n\n(Where `{version}` is the version you downloaded.)\n\nOr unzip, if you chose the zipball:\n\n```bash\n$ unzip zf-apigility-skeleton-{version}.zip\n```\n\n(Where `{version}` is the version you downloaded.)\n\n### Via Composer (create-project)\n\nYou can use the `create-project` command from [Composer](http://getcomposer.org/)\nto create the project in one go (you need to install [composer](https://getcomposer.org/doc/00-intro.md#downloading-the-composer-executable)):\n\n```bash\n$ curl -s https://getcomposer.org/installer | php -- --filename=composer\n$ composer create-project -sdev zfcampus/zf-apigility-skeleton path/to/install\n```\n\n### Via Git (clone)\n\nFirst, clone the repository:\n\n```bash\n# git clone https://github.com/zfcampus/zf-apigility-skeleton.git # optionally, specify the directory in which to clone\n$ cd path/to/install\n```\n\nAt this point, you need to use [Composer](https://getcomposer.org/) to install\ndependencies. Assuming you already have Composer:\n\n```bash\n$ composer install\n```\n\n### All methods\n\nOnce you have the basic installation, you need to put it in development mode:\n\n```bash\n$ cd path/to/install\n$ composer development-enable\n```\n\nNow, fire it up! Do one of the following:\n\n- Create a vhost in your web server that points the DocumentRoot to the\n  `public/` directory of the project\n- Fire up the built-in web server in PHP(**note**: do not use this for\n  production!)\n\nIn the latter case, do the following:\n\n```bash\n$ cd path/to/install\n$ php -S 0.0.0.0:8080 -ddisplay_errors=0 -t public public/index.php\n# OR use the composer alias:\n$ composer serve\n```\n\nYou can then visit the site at http://localhost:8080/ - which will bring up a\nwelcome page and the ability to visit the dashboard in order to create and\ninspect your APIs.\n\n### NOTE ABOUT USING APACHE\n\nApache forbids the character sequences `%2F` and `%5C` in URI paths. However, the Apigility Admin\nAPI uses these characters for a number of service endpoints. As such, if you wish to use the\nAdmin UI and/or Admin API with Apache, you will need to configure your Apache vhost/project to\nallow encoded slashes:\n\n```apacheconf\nAllowEncodedSlashes On\n```\n\nThis change will need to be made in your server's vhost file (it cannot be added to `.htaccess`).\n\n### NOTE ABOUT OPCACHE\n\n**Disable all opcode caches when running the admin!**\n\nThe admin cannot and will not run correctly when an opcode cache, such as APC or\nOpCache, is enabled. Apigility does not use a database to store configuration;\ninstead, it uses PHP configuration files. Opcode caches will cache these files\non first load, leading to inconsistencies as you write to them, and will\ntypically lead to a state where the admin API and code become unusable.\n\nThe admin is a **development** tool, and intended for use a development\nenvironment. As such, you should likely disable opcode caching, regardless.\n\nWhen you are ready to deploy your API to **production**, however, you can\ndisable development mode, thus disabling the admin interface, and safely run an\nopcode cache again. Doing so is recommended for production due to the tremendous\nperformance benefits opcode caches provide.\n\n### NOTE ABOUT DISPLAY_ERRORS\n\nThe `display_errors` `php.ini` setting is useful in development to understand what warnings,\nnotices, and error conditions are affecting your application. However, they cause problems for APIs:\nAPIs are typically a specific serialization format, and error reporting is usually in either plain\ntext, or, with extensions like XDebug, in HTML. This breaks the response payload, making it unusable\nby clients.\n\nFor this reason, we recommend disabling `display_errors` when using the Apigility admin interface.\nThis can be done using the `-ddisplay_errors=0` flag when using the built-in PHP web server, or you\ncan set it in your virtual host or server definition. If you disable it, make sure you have\nreasonable error log settings in place. For the built-in PHP web server, errors will be reported in\nthe console itself; otherwise, ensure you have an error log file specified in your configuration.\n\n`display_errors` should *never* be enabled in production, regardless.\n\n### Vagrant\n\nIf you prefer to develop with Vagrant, there is a basic vagrant recipe included with this project.\n\nThis recipe assumes that you already have Vagrant installed. The virtual machine will try to use localhost:8080 by\ndefault, so if you already have a server on this port of your host machine, you need to shut down the conflicting\nserver first, or if you know how, you can reconfigure the ports in Vagrantfile.\n\nAssuming you have Vagrant installed and assuming you have no port conflicts, you can bring up the Vagrant machine\nwith the standard `up` command:\n\n```bash\n$ vagrant up\n```\n\nWhen the machine comes up, you can ssh to it with the standard ssh forward agent:\n\n```bash\n$ vagrant ssh\n```\n\nThe web root is inside the shared directory, which is at `/var/www`; this is\nalso the home directory for the vagrant issue, which will be the initial\ndirectory you land in once you connect via SSH.\n\nThe image installs composer during provisioning, meaning you can use it to\ninstall and update dependencies:\n\n```bash\n# Install dependencies:\n$ vagrant ssh -c 'composer install'\n# Update dependencies:\n$ vagrant ssh -c 'composer update'\n```\n\nYou can also manipulate development mode:\n\n```bash\n$ vagrant ssh -c 'composer development-enable'\n$ vagrant ssh -c 'composer development-disable'\n$ vagrant ssh -c 'composer development-status'\n```\n\n> #### Vagrant and VirtualBox\n>\n> The vagrant image is based on `bento/ubuntu-16.04`. If you are using VirtualBox as\n> a provider, you will need:\n>\n> - Vagrant 1.8.5 or later\n> - VirtualBox 5.0.26 or later\n\nFor vagrant documentation, please refer to [vagrantup.com](https://www.vagrantup.com/)\n\n### Docker\n\nIf you develop or deploy using Docker, we provide configuration for you.\n\nPrepare your development environment using [docker compose](https://docs.docker.com/compose/install/):\n\n```bash\n$ git clone https://github.com/zfcampus/zf-apigility-skeleton\n$ cd zf-apigility-skeleton\n$ docker-compose build\n# Install dependencies via composer, if you haven't already:\n$ docker-compose run apigility composer install\n# Enable development mode:\n$ docker-compose run apigility composer development-enable\n```\n\nStart the container:\n\n```bash\n$ docker-compose up\n```\n\nAccess Apigility from `http://localhost:8080/` or `http://<boot2docker ip>:8080/` if on Windows or Mac.\n\nYou may also use the provided `Dockerfile` directly if desired.\n\nOnce installed, you can use the container to update dependencies:\n\n```bash\n$ docker-compose run apigility composer update\n```\n\nOr to manipulate development mode:\n\n```bash\n$ docker-compose run apigility composer development-enable\n$ docker-compose run apigility composer development-disable\n$ docker-compose run apigility composer development-status\n```\n\nQA Tools\n--------\n\nThe skeleton ships with minimal QA tooling by default, including\nzendframework/zend-test. We supply basic tests for the shipped\n`Application\\Controller\\IndexController`.\n\nWe also ship with configuration for [phpcs](https://github.com/squizlabs/php_codesniffer).\nIf you wish to add this QA tool, execute the following:\n\n```bash\n$ composer require --dev squizlabs/php_codesniffer\n```\n\nWe provide aliases for each of these tools in the Composer configuration:\n\n```bash\n# Run CS checks:\n$ composer cs-check\n# Fix CS errors:\n$ composer cs-fix\n# Run PHPUnit tests:\n$ composer test\n```\n"
  },
  {
    "path": "SUPPORT.md",
    "content": "# Getting Support\n\nZend Framework offers three support channels:\n\n- For real-time questions, use our\n  [chat](https://zendframework-slack.herokuapp.com)\n- For detailed questions (e.g., those requiring examples) use our\n  [forums](https://discourse.zendframework.com/c/questions/apigility)\n- To report issues, use this repository's\n  [issue tracker](https://github.com/zfcampus/zf-apigility-skeleton/issues/new)\n\n**DO NOT** use the issue tracker to ask questions; use chat or the forums for\nthat. Questions posed to the issue tracker will be closed.\n\nWhen reporting an issue, please include the following details:\n\n- A narrative description of what you are trying to accomplish.\n- The minimum code necessary to reproduce the issue.\n- The expected results of exercising that code.\n- The actual results received.\n\nWe may ask for additional details: what version of the library you are using,\nand what PHP version was used to reproduce the issue.\n\nYou may also submit a failing test case as a pull request.\n"
  },
  {
    "path": "Vagrantfile",
    "content": "# -*- mode: ruby -*-\n# vi: set ft=ruby :\n\nVAGRANTFILE_API_VERSION = '2'\n\n@script = <<SCRIPT\n# Install dependencies\napt-get update\napt-get install -y apache2 git curl php7.0 php7.0-bcmath php7.0-bz2 php7.0-cli php7.0-curl php7.0-intl php7.0-json php7.0-mbstring php7.0-opcache php7.0-soap php7.0-sqlite3 php7.0-xml php7.0-xsl php7.0-zip libapache2-mod-php7.0\n\n# Configure Apache\necho \"<VirtualHost *:80>\n\tDocumentRoot /var/www/public\n\tAllowEncodedSlashes On\n\n\t<Directory /var/www/public>\n\t\tOptions +Indexes +FollowSymLinks\n\t\tDirectoryIndex index.php index.html\n\t\tOrder allow,deny\n\t\tAllow from all\n\t\tAllowOverride All\n\t</Directory>\n\n\tErrorLog ${APACHE_LOG_DIR}/error.log\n\tCustomLog ${APACHE_LOG_DIR}/access.log combined\n</VirtualHost>\" > /etc/apache2/sites-available/000-default.conf\na2enmod rewrite\nservice apache2 restart\n\nif [ -e /usr/local/bin/composer ]; then\n    /usr/local/bin/composer self-update\nelse\n    curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer\nfi\n\n# Reset home directory of vagrant user\nif ! grep -q \"cd /var/www\" /home/vagrant/.profile; then\n    echo \"cd /var/www\" >> /home/vagrant/.profile\nfi\n\necho \"** [ZF] Run the following command to install dependencies, if you have not already:\"\necho \"    vagrant ssh -c 'composer install'\"\necho \"** [ZF] Visit http://localhost:8080 in your browser for to view the application **\"\nSCRIPT\n\nVagrant.configure(VAGRANTFILE_API_VERSION) do |config|\n  config.vm.box = 'bento/ubuntu-16.04'\n  config.vm.network \"forwarded_port\", guest: 80, host: 8080\n  config.vm.synced_folder '.', '/var/www', owner: \"www-data\", group: \"www-data\"\n  config.vm.provision 'shell', inline: @script\n\n  config.vm.provider \"virtualbox\" do |vb|\n    vb.customize [\"modifyvm\", :id, \"--memory\", \"1024\"]\n    vb.customize [\"modifyvm\", :id, \"--name\", \"Apigility - Ubuntu 16.04\"]\n  end\nend\n"
  },
  {
    "path": "composer.json",
    "content": "{\n    \"name\": \"zfcampus/zf-apigility-skeleton\",\n    \"description\": \"Skeleton Application for Apigility\",\n    \"type\": \"project\",\n    \"license\": \"BSD-3-Clause\",\n    \"keywords\": [\n        \"api\",\n        \"apigility\",\n        \"framework\",\n        \"zf\",\n        \"zendframework\"\n    ],\n    \"homepage\": \"http://apigility.org/\",\n    \"support\": {\n        \"issues\": \"https://github.com/zfcampus/zf-apigility-skeleton/issues\",\n        \"source\": \"https://github.com/zfcampus/zf-apigility-skeleton\",\n        \"rss\": \"https://github.com/zfcampus/zf-apigility-skeleton/releases.atom\",\n        \"chat\": \"https://zendframework-slack.herokuapp.com\",\n        \"forum\": \"https://discourse.zendframework.com/c/questions/apigility\"\n    },\n    \"config\": {\n        \"process-timeout\": 5000\n    },\n    \"extra\": {\n        \"branch-alias\": {\n            \"dev-master\": \"1.5.x-dev\",\n            \"dev-develop\": \"1.6.x-dev\"\n        }\n    },\n    \"require\": {\n        \"php\": \"^5.6 || ^7.0\",\n        \"zendframework/zend-component-installer\": \"^1.1.1 || ^2.1.1\",\n        \"zfcampus/zf-apigility\": \"^1.4\",\n        \"zfcampus/zf-apigility-documentation\": \"^1.3\",\n        \"zfcampus/zf-development-mode\": \"^3.2\"\n    },\n    \"require-dev\": {\n        \"zendframework/zend-developer-tools\": \"^1.2.1\",\n        \"zendframework/zend-test\": \"^2.6.1 || ^3.2\",\n        \"zfcampus/zf-apigility-admin\": \"^1.6\",\n        \"zfcampus/zf-asset-manager\": \"^1.2\",\n        \"zfcampus/zf-composer-autoloading\": \"^1.1.1 || ^2.1\",\n        \"zfcampus/zf-deploy\": \"^1.3\"\n    },\n    \"suggest\": {\n        \"zfcampus/zf-apigility-doctrine\": \"zfcampus/zf-apigility-doctrine ^2.2 to create Doctrine-Connected REST services\",\n        \"zfcampus/zf-http-cache\": \"zfcampus/zf-http-cache ^1.4 to add HTTP caching to your API\",\n        \"zfr/zfr-cors\": \"zfr/zfr-cors ^1.5 to add CORS support to your API\"\n    },\n    \"autoload\": {\n        \"psr-4\": {\n            \"Application\\\\\": \"module/Application/src/\"\n        }\n    },\n    \"autoload-dev\": {\n        \"psr-4\": {\n            \"ApplicationTest\\\\\": \"module/Application/test/\"\n        },\n        \"files\": [\n            \"src/Apigility/constants.php\"\n        ]\n    },\n    \"scripts\": {\n        \"cs-check\": \"phpcs\",\n        \"cs-fix\": \"phpcbf\",\n        \"development-disable\": \"zf-development-mode disable\",\n        \"development-enable\": \"zf-development-mode enable\",\n        \"development-status\": \"zf-development-mode status\",\n        \"post-create-project-cmd\": [\"@development-enable\"],\n        \"serve\": \"php -S 0.0.0.0:8080 -t public/\",\n        \"test\": \"phpunit\"\n    }\n}\n"
  },
  {
    "path": "config/application.config.php",
    "content": "<?php\n/**\n * @license   http://opensource.org/licenses/BSD-3-Clause BSD-3-Clause\n * @copyright Copyright (c) 2014-2016 Zend Technologies USA Inc. (http://www.zend.com)\n */\n\nreturn [\n    // Retrieve the list of modules for this application.\n    'modules' => include __DIR__ . '/modules.config.php',\n    // This should be an array of paths in which modules reside.\n    // If a string key is provided, the listener will consider that a module\n    // namespace, the value of that key the specific path to that module's\n    // Module class.\n    'module_listener_options' => [\n        'module_paths' => [\n            './module',\n            './vendor'\n        ],\n        // Using __DIR__ to ensure cross-platform compatibility. Some platforms --\n        // e.g., IBM i -- have problems with globs that are not qualified.\n        'config_glob_paths' => [realpath(__DIR__) . '/autoload/{,*.}{global,local}.php'],\n        'config_cache_key' => 'application.config.cache',\n        'config_cache_enabled' => true,\n        'module_map_cache_key' => 'application.module.cache',\n        'module_map_cache_enabled' => true,\n        'cache_dir' => 'data/cache/',\n    ],\n];\n"
  },
  {
    "path": "config/autoload/.gitignore",
    "content": "local.php\nlocal-development.php\n*.local.php\n*.local-development.php\n"
  },
  {
    "path": "config/autoload/README.md",
    "content": "About this directory:\n=====================\n\nBy default, this application is configured to load all configs in\n`./config/autoload/{,*.}{global,local}.php`. Doing this provides a\nlocation for a developer to drop in configuration override files provided by\nmodules, as well as cleanly provide individual, application-wide config files\nfor things like database connections, etc.\n"
  },
  {
    "path": "config/autoload/global-development.php",
    "content": "<?php\n/**\n * @license   http://opensource.org/licenses/BSD-3-Clause BSD-3-Clause\n * @copyright Copyright (c) 2014-2016 Zend Technologies USA Inc. (http://www.zend.com)\n */\n\nuse ZF\\Apigility\\Admin\\Model\\ModulePathSpec;\n\nreturn [\n    'view_manager' => [\n        'display_exceptions' => true,\n    ],\n    'zf-apigility-admin' => [\n        'path_spec' => ModulePathSpec::PSR_4,\n    ],\n    'zf-configuration' => [\n        'enable_short_array' => true,\n        'class_name_scalars' => true,\n    ],\n];\n"
  },
  {
    "path": "config/autoload/global.php",
    "content": "<?php\n/**\n * @license   http://opensource.org/licenses/BSD-3-Clause BSD-3-Clause\n * @copyright Copyright (c] 2014-2016 Zend Technologies USA Inc. (http://www.zend.com]\n */\n\nreturn [\n    'zf-content-negotiation' => [\n        'selectors' => [],\n    ],\n    'db' => [\n        'adapters' => [\n            'dummy' => [],\n        ],\n    ],\n];\n"
  },
  {
    "path": "config/autoload/local.php.dist",
    "content": "<?php\n/**\n * Local Configuration Override\n *\n * This configuration override file is for overriding environment-specific and\n * security-sensitive configuration information. Copy this file without the\n * .dist extension at the end and populate values as needed.\n *\n * @NOTE: This file is ignored from Git by default with the .gitignore included\n * in ZendSkeletonApplication. This is a good practice, as it prevents sensitive\n * credentials from accidentally being committed into version control.\n */\n\nreturn [];\n"
  },
  {
    "path": "config/autoload/user.global.php",
    "content": "<?php\n/**\n * @license   http://opensource.org/licenses/BSD-3-Clause BSD-3-Clause\n * @copyright Copyright (c) 2014 Zend Technologies USA Inc. (http://www.zend.com)\n */\n\n/**\n * Global Configuration Override\n *\n * You can use this file for overriding configuration values from modules, etc.\n * You would place values in here that are agnostic to the environment and not\n * sensitive to security.\n *\n * @NOTE: In practice, this file will typically be INCLUDED in your source\n * control, so do not include passwords or other sensitive information in this\n * file.\n */\n\nreturn [\n    // ...\n];\n"
  },
  {
    "path": "config/autoload/zf-mvc-auth-oauth2-override.global.php",
    "content": "<?php\n/**\n * This file was autogenerated by zfcampus/zf-mvc-auth (bin/zf-mvc-auth-oauth2-override.php),\n * and overrides the ZF\\OAuth2\\Service\\OAuth2Server to provide the ability to create named\n * OAuth2\\Server instances.\n */\nreturn [\n    'service_manager' => [\n        'factories' => [\n            \\ZF\\OAuth2\\Service\\OAuth2Server::class => \\ZF\\MvcAuth\\Factory\\NamedOAuth2ServerFactory::class,\n        ],\n    ],\n];\n"
  },
  {
    "path": "config/autoload/zfconfig.global.php",
    "content": "<?php\n/**\n * @license   http://opensource.org/licenses/BSD-3-Clause BSD-3-Clause\n * @copyright Copyright (c) 2014 Zend Technologies USA Inc. (http://www.zend.com)\n */\n\nreturn [\n    'view_manager' => [\n        'strategies' => [\n            'ViewJsonStrategy',\n        ],\n    ],\n];\n"
  },
  {
    "path": "config/development.config.php.dist",
    "content": "<?php\n/**\n * @license   http://opensource.org/licenses/BSD-3-Clause BSD-3-Clause\n * @copyright Copyright (c) 2014-2016 Zend Technologies USA Inc. (http://www.zend.com)\n */\n\nreturn [\n    // Development time modules\n    'modules' => [\n        'ZendDeveloperTools',\n        'ZF\\Apigility\\Admin',\n    ],\n    // development time configuration globbing\n    'module_listener_options' => [\n        'config_glob_paths' => [realpath(__DIR__) . '/autoload/{,*.}{global,local}-development.php'],\n        'config_cache_enabled' => false,\n        'module_map_cache_enabled' => false,\n    ],\n];\n"
  },
  {
    "path": "config/modules.config.php",
    "content": "<?php\n/**\n * @license   http://opensource.org/licenses/BSD-3-Clause BSD-3-Clause\n * @copyright Copyright (c) 2014-2016 Zend Technologies USA Inc. (http://www.zend.com)\n */\n\n/**\n * List of enabled modules for this application.\n */\nreturn [\n    'Zend\\Db',\n    'Zend\\Filter',\n    'Zend\\Hydrator',\n    'Zend\\InputFilter',\n    'Zend\\Paginator',\n    'Zend\\Router',\n    'Zend\\Validator',\n    'ZF\\Apigility',\n    'ZF\\Apigility\\Documentation',\n    'ZF\\ApiProblem',\n    'ZF\\Configuration',\n    'ZF\\OAuth2',\n    'ZF\\MvcAuth',\n    'ZF\\Hal',\n    'ZF\\ContentNegotiation',\n    'ZF\\ContentValidation',\n    'ZF\\Rest',\n    'ZF\\Rpc',\n    'ZF\\Versioning',\n    'Application',\n];\n"
  },
  {
    "path": "data/cache/.gitkeep",
    "content": ""
  },
  {
    "path": "docker-compose.yml",
    "content": "version: \"2\"\nservices:\n  apigility:\n    build:\n      context: .\n      dockerfile: Dockerfile\n    ports:\n     - \"8080:80\"\n    volumes:\n     - .:/var/www\n"
  },
  {
    "path": "module/Application/config/module.config.php",
    "content": "<?php\n/**\n * @license   http://opensource.org/licenses/BSD-3-Clause BSD-3-Clause\n * @copyright Copyright (c) 2014-2016 Zend Technologies USA Inc. (http://www.zend.com)\n */\n\nnamespace Application;\n\nuse Zend\\ServiceManager\\Factory\\InvokableFactory;\n\nreturn [\n    'router' => [\n        'routes' => [\n            'home' => [\n                'type' => 'Literal',\n                'options' => [\n                    'route'    => '/',\n                    'defaults' => [\n                        'controller' => Controller\\IndexController::class,\n                        'action'     => 'index',\n                    ],\n                ],\n            ],\n        ],\n    ],\n    'controllers' => [\n        'factories' => [\n            Controller\\IndexController::class => InvokableFactory::class,\n        ],\n    ],\n    'view_manager' => [\n        'display_not_found_reason' => true,\n        'display_exceptions'       => true,\n        'doctype'                  => 'HTML5',\n        'not_found_template'       => 'error/404',\n        'exception_template'       => 'error/index',\n        'template_map' => [\n            'layout/layout'           => __DIR__ . '/../view/layout/layout.phtml',\n            'application/index/index' => __DIR__ . '/../view/application/index/index.phtml',\n            'error/404'               => __DIR__ . '/../view/error/404.phtml',\n            'error/index'             => __DIR__ . '/../view/error/index.phtml',\n        ],\n        'template_path_stack' => [\n            __DIR__ . '/../view',\n        ],\n    ],\n];\n"
  },
  {
    "path": "module/Application/src/Controller/IndexController.php",
    "content": "<?php\n/**\n * @license   http://opensource.org/licenses/BSD-3-Clause BSD-3-Clause\n * @copyright Copyright (c) 2014-2016 Zend Technologies USA Inc. (http://www.zend.com)\n */\n\nnamespace Application\\Controller;\n\nuse Zend\\Mvc\\Controller\\AbstractActionController;\nuse Zend\\View\\Model\\ViewModel;\nuse ZF\\Apigility\\Admin\\Module as AdminModule;\n\nclass IndexController extends AbstractActionController\n{\n    public function indexAction()\n    {\n        if (class_exists(AdminModule::class, false)) {\n            return $this->redirect()->toRoute('zf-apigility/ui');\n        }\n        return new ViewModel();\n    }\n}\n"
  },
  {
    "path": "module/Application/src/Module.php",
    "content": "<?php\n/**\n * @license   http://opensource.org/licenses/BSD-3-Clause BSD-3-Clause\n * @copyright Copyright (c) 2014-2016 Zend Technologies USA Inc. (http://www.zend.com)\n */\n\nnamespace Application;\n\nclass Module\n{\n    public function getConfig()\n    {\n        return include __DIR__ . '/../config/module.config.php';\n    }\n}\n"
  },
  {
    "path": "module/Application/test/Controller/IndexControllerTest.php",
    "content": "<?php\n/**\n * @license   http://opensource.org/licenses/BSD-3-Clause BSD-3-Clause\n * @copyright Copyright (c) 2016 Zend Technologies USA Inc. (http://www.zend.com)\n */\n\nnamespace ApplicationTest\\Controller;\n\nuse Application\\Controller\\IndexController;\nuse Zend\\Stdlib\\ArrayUtils;\nuse Zend\\Test\\PHPUnit\\Controller\\AbstractHttpControllerTestCase;\n\nclass IndexControllerTest extends AbstractHttpControllerTestCase\n{\n    public function setUp()\n    {\n        // The module configuration should still be applicable for tests.\n        // You can override configuration here with test case specific values,\n        // such as sample view templates, path stacks, module_listener_options,\n        // etc.\n        $configOverrides = [\n            'module_listener_options' => [\n                'config_cache_enabled' => false,\n            ],\n        ];\n\n        $this->setApplicationConfig(ArrayUtils::merge(\n            include __DIR__ . '/../../../../config/application.config.php',\n            $configOverrides\n        ));\n\n        parent::setUp();\n    }\n\n    public function testIndexActionCanBeAccessed()\n    {\n        $this->dispatch('/', 'GET');\n        $this->assertResponseStatusCode(200);\n        $this->assertModuleName('application');\n        $this->assertControllerName(IndexController::class); // as specified in router's controller name alias\n        $this->assertControllerClass('IndexController');\n        $this->assertMatchedRouteName('home');\n    }\n\n    public function testIndexActionViewModelTemplateRenderedWithinLayout()\n    {\n        $this->dispatch('/', 'GET');\n        $this->assertQuery('.hero-unit');\n    }\n\n    public function testInvalidRouteDoesNotCrash()\n    {\n        $this->dispatch('/invalid/route', 'GET');\n        $this->assertResponseStatusCode(404);\n    }\n}\n"
  },
  {
    "path": "module/Application/test/Controller/ZZIndexControllerDevModeTest.php",
    "content": "<?php\n/**\n * @license   http://opensource.org/licenses/BSD-3-Clause BSD-3-Clause\n * @copyright Copyright (c) 2016 Zend Technologies USA Inc. (http://www.zend.com)\n */\n\nnamespace ApplicationTest\\Controller;\n\nuse Application\\Controller\\IndexController;\nuse Zend\\Stdlib\\ArrayUtils;\nuse Zend\\Test\\PHPUnit\\Controller\\AbstractHttpControllerTestCase;\n\n/**\n * Name is intentional, to force it to run last; this was necessary as,\n * once the Admin module is loaded, the controller is able to find it and\n * will attempt the redirect.\n */\nclass ZZIndexControllerDevModeTest extends AbstractHttpControllerTestCase\n{\n    public function setUp()\n    {\n        // The module configuration should still be applicable for tests.\n        // You can override configuration here with test case specific values,\n        // such as sample view templates, path stacks, module_listener_options,\n        // etc.\n        $configOverrides = [\n            'modules' => [\n                'ZF\\Apigility\\Admin',\n                'ZF\\Apigility\\Admin\\Ui',\n            ],\n            'module_listener_options' => [\n                'config_cache_enabled' => false,\n                'config_glob_paths' => [\n                    __DIR__ . '/../../../../config/autoload/{,*.}{global,local}.php',\n                    __DIR__ . '/../../../../config/autoload/{,*.}{global,local}-development.php',\n                ],\n            ]\n        ];\n\n        $this->setApplicationConfig(ArrayUtils::merge(\n            include __DIR__ . '/../../../../config/application.config.php',\n            $configOverrides\n        ));\n\n        parent::setUp();\n    }\n\n    public function testIndexActionRedirectsToAdminUi()\n    {\n        $this->dispatch('/', 'GET');\n        $this->assertResponseStatusCode(302);\n        $this->assertRedirectRegex('#/ui$#');\n    }\n}\n"
  },
  {
    "path": "module/Application/view/application/index/index.phtml",
    "content": "<div class=\"hero-unit\">\n    <p align=\"center\"><img src=\"/img/ag-hero.png\" alt=\"Apigility <?= \\Apigility\\VERSION ?>\"></p>\n</div>\n<div class=\"row\">\n    <div class=\"span8\">\n        <p><br /><br />In order to use the <strong>Apigility Admin UI</strong> you need to enable the <strong>development</strong> mode. Currently your application is running in <strong>production</strong> mode.</p>\n        <p>To enable the development mode you can execute the following command from the terminal:</p>\n        <p><pre>$ composer development-enable</pre></p>\n        <p>Remember to set always the production mode if you want to deploy your API in a staging/production environment.</p>\n    </div>\n</div>\n"
  },
  {
    "path": "module/Application/view/error/404.phtml",
    "content": "<?php\nuse Zend\\Mvc\\Application;\n?>\n<h1>A 404 error occurred</h1>\n<h2><?= $this->message ?></h2>\n\n<?php\nif (! empty($this->reason)) :\n    $reasonMessage = '';\n    switch ($this->reason) {\n        case Application::ERROR_CONTROLLER_CANNOT_DISPATCH:\n            $reasonMessage = 'The requested controller was unable to dispatch the request.';\n            break;\n        case Application::ERROR_MIDDLEWARE_CANNOT_DISPATCH:\n            $reasonMessage = 'The requested middleware was unable to dispatch the request.';\n            break;\n        case Application::ERROR_CONTROLLER_NOT_FOUND:\n            $reasonMessage = 'The requested controller could not be mapped to an existing controller class.';\n            break;\n        case Application::ERROR_CONTROLLER_INVALID:\n            $reasonMessage = 'The requested controller was not dispatchable.';\n            break;\n        case Application::ERROR_ROUTER_NO_MATCH:\n            $reasonMessage = 'The requested URL could not be matched by routing.';\n            break;\n        default:\n            $reasonMessage = 'We cannot determine at this time why a 404 was generated.';\n            break;\n    }\n?>\n\n<p><?= $reasonMessage ?></p>\n\n<?php endif ?>\n\n<?php if (! empty($this->controller)) : ?>\n\n<dl>\n    <dt>Controller:</dt>\n    <dd><?= $this->escapeHtml($this->controller) ?>\n    <?php\n    if (! empty($this->controller_class)\n        && $this->controller_class != $this->controller\n    ) {\n        echo sprintf('(resolves to %s)', $this->escapeHtml($this->controller_class));\n    }\n    ?>\n</dd>\n</dl>\n\n<?php endif ?>\n\n<?php if (! empty($this->display_exceptions)) : ?>\n\n    <?php if (isset($this->exception)\n        && ($this->exception instanceof \\Throwable || $this->exception instanceof \\Exception)) : ?>\n<hr/>\n<h2>Additional information:</h2>\n<h3><?= get_class($this->exception) ?></h3>\n<dl>\n    <dt>File:</dt>\n    <dd>\n        <pre class=\"prettyprint linenums\"><?= $this->exception->getFile() ?>:<?= $this->exception->getLine() ?></pre>\n    </dd>\n    <dt>Message:</dt>\n    <dd>\n        <pre class=\"prettyprint linenums\"><?= $this->escapeHtml($this->exception->getMessage()) ?></pre>\n    </dd>\n    <dt>Stack trace:</dt>\n    <dd>\n        <pre class=\"prettyprint linenums\"><?= $this->exception->getTraceAsString() ?></pre>\n    </dd>\n</dl>\n        <?php $e = $this->exception->getPrevious() ?>\n        <?php if ($e) : ?>\n<hr/>\n<h2>Previous exceptions:</h2>\n<ul class=\"unstyled\">\n            <?php while ($e) : ?>\n    <li>\n        <h3><?= get_class($e) ?></h3>\n        <dl>\n            <dt>File:</dt>\n            <dd>\n                <pre class=\"prettyprint linenums\"><?= $e->getFile() ?>:<?= $e->getLine() ?></pre>\n            </dd>\n            <dt>Message:</dt>\n            <dd>\n                <pre class=\"prettyprint linenums\"><?= $this->escapeHtml($e->getMessage()) ?></pre>\n            </dd>\n            <dt>Stack trace:</dt>\n            <dd>\n                <pre class=\"prettyprint linenums\"><?= $e->getTraceAsString() ?></pre>\n            </dd>\n        </dl>\n    </li>\n                <?php $e = $e->getPrevious() ?>\n            <?php endwhile ?>\n</ul>\n        <?php endif ?>\n\n    <?php else : ?>\n\n<h3>No Exception available</h3>\n\n    <?php endif ?>\n\n<?php endif ?>\n"
  },
  {
    "path": "module/Application/view/error/index.phtml",
    "content": "<h1>An error occurred</h1>\n<h2><?= $this->message ?></h2>\n\n<?php if (! empty($this->display_exceptions)) : ?>\n\n    <?php if (isset($this->exception)\n        && ($this->exception instanceof \\Throwable || $this->exception instanceof \\Exception)) : ?>\n<hr/>\n<h2>Additional information:</h2>\n<h3><?= get_class($this->exception) ?></h3>\n<dl>\n    <dt>File:</dt>\n    <dd>\n        <pre class=\"prettyprint linenums\"><?= $this->exception->getFile() ?>:<?= $this->exception->getLine() ?></pre>\n    </dd>\n    <dt>Message:</dt>\n    <dd>\n        <pre class=\"prettyprint linenums\"><?= $this->escapeHtml($this->exception->getMessage()) ?></pre>\n    </dd>\n    <dt>Stack trace:</dt>\n    <dd>\n        <pre class=\"prettyprint linenums\"><?= $this->exception->getTraceAsString() ?></pre>\n    </dd>\n</dl>\n        <?php $e = $this->exception->getPrevious() ?>\n        <?php if ($e) : ?>\n<hr/>\n<h2>Previous exceptions:</h2>\n<ul class=\"unstyled\">\n            <?php while ($e) : ?>\n    <li>\n        <h3><?= get_class($e); ?></h3>\n        <dl>\n            <dt>File:</dt>\n            <dd>\n                <pre class=\"prettyprint linenums\"><?= $e->getFile() ?>:<?= $e->getLine() ?></pre>\n            </dd>\n            <dt>Message:</dt>\n            <dd>\n                <pre class=\"prettyprint linenums\"><?= $this->escapeHtml($e->getMessage()) ?></pre>\n            </dd>\n            <dt>Stack trace:</dt>\n            <dd>\n                <pre class=\"prettyprint linenums\"><?= $e->getTraceAsString() ?></pre>\n            </dd>\n        </dl>\n    </li>\n                <?php $e = $e->getPrevious() ?>\n            <?php endwhile ?>\n</ul>\n        <?php endif ?>\n\n    <?php else : ?>\n\n<h3>No Exception available</h3>\n\n    <?php endif ?>\n\n<?php endif ?>\n"
  },
  {
    "path": "module/Application/view/layout/layout.phtml",
    "content": "<?= $this->doctype() ?>\n<html lang=\"en\">\n<head>\n    <meta charset=\"utf-8\">\n<?php\necho $this->headTitle('Apigility');\n\necho $this->headMeta()->appendName('viewport', 'width=device-width, initial-scale=1.0');\n\necho $this->headLink(['rel' => 'icon', 'type' => 'image/png', 'href' => $this->basePath('/img/favicon.png')])\n    ->prependStylesheet($this->basePath('/zf-apigility/css/main.min.css'))\n    ->prependStylesheet($this->basePath('/zf-apigility/css/bootstrap.min.css'));\n\necho $this->headScript()\n    ->prependFile($this->basePath('/zf-apigility/js/bootstrap.min.js'))\n    ->prependFile($this->basePath('/zf-apigility/js/jquery.min.js'));\n?>\n</head>\n<body>\n    <div class=\"container\">\n        <?= $this->content ?>\n    </div>\n    <footer>\n        <hr>\n        <div class=\"container center-block\"><div class=\"row\">\n            <div class=\"col-sm-4\">\n                &copy; Copyright 2013 - <?= date('Y') ?>\n                by <a href=\"http://www.zend.com\">Zend Technologies</a> Ltd.\n            </div>\n\n            <div class=\"col-sm-4\"><p class=\"center-block\">\n                Apigility version <strong><?= \\Apigility\\VERSION ?></strong>\n            </p></div>\n\n            <div class=\"col-sm-4\"><p class=\"pull-right\">\n                For more information <a href=\"https://apigility.org\">apigility.org</a>\n            </p></div>\n        </div></div>\n    </footer>\n    <?= $this->inlineScript() ?>\n</body>\n</html>\n"
  },
  {
    "path": "phpcs.xml",
    "content": "<?xml version=\"1.0\"?>\n<ruleset name=\"Zend Framework coding standard\">\n    <description>Zend Framework coding standard</description>\n\n    <!-- display progress -->\n    <arg value=\"p\"/>\n    <arg name=\"colors\"/>\n    <arg name=\"extensions\" value=\"php,dist,phtml\"/>\n\n    <!-- inherit rules from: -->\n    <rule ref=\"PSR2\"/>\n    <rule ref=\"Generic.Arrays.DisallowLongArraySyntax\"/>\n    <rule ref=\"Generic.Formatting.SpaceAfterNot\"/>\n    <rule ref=\"Squiz.WhiteSpace.OperatorSpacing\">\n        <properties>\n            <property name=\"ignoreNewlines\" value=\"true\"/>\n        </properties>\n    </rule>\n    <rule ref=\"Squiz.WhiteSpace.SuperfluousWhitespace\">\n        <properties>\n            <property name=\"ignoreBlankLines\" value=\"false\"/>\n        </properties>\n    </rule>\n    <rule ref=\"PSR1.Files.SideEffects\">\n        <exclude-pattern>public/index.php</exclude-pattern>\n    </rule>\n\n    <!-- Paths to check -->\n    <file>config</file>\n    <file>module</file>\n    <file>public/index.php</file>\n    <file>src</file>\n</ruleset>\n"
  },
  {
    "path": "phpunit.xml.dist",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<phpunit xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\"\n         xsi:noNamespaceSchemaLocation=\"vendor/phpunit/phpunit/phpunit.xsd\"\n         bootstrap=\"vendor/autoload.php\"\n         colors=\"true\">\n    <testsuites>\n        <testsuite name=\"zf-apigility-skeleton\">\n            <directory>./module/Application/test</directory>\n        </testsuite>\n    </testsuites>\n\n    <filter>\n        <whitelist processUncoveredFilesFromWhitelist=\"true\">\n            <directory suffix=\".php\">./module/Application/src</directory>\n        </whitelist>\n    </filter>\n</phpunit>\n"
  },
  {
    "path": "public/.gitignore",
    "content": "apigility-ui/\nzf-apigility/\n"
  },
  {
    "path": "public/.htaccess",
    "content": "RewriteEngine On\n# The following rule allows authentication to work with fast-cgi\nRewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]\n# The following rule tells Apache that if the requested filename\n# exists, simply serve it.\nRewriteCond %{REQUEST_FILENAME} -s [OR]\nRewriteCond %{REQUEST_FILENAME} -l [OR]\nRewriteCond %{REQUEST_FILENAME} -d\nRewriteRule ^.*$ - [NC,L]\n# The following rewrites all other queries to index.php. The \n# condition ensures that if you are using Apache aliases to do\n# mass virtual hosting, the base path will be prepended to \n# allow proper resolution of the index.php file; it will work\n# in non-aliased environments as well, providing a safe, one-size \n# fits all solution.\nRewriteCond %{REQUEST_URI}::$1 ^(/.+)(.+)::\\2$\nRewriteRule ^(.*) - [E=BASE:%1]\nRewriteRule ^(.*)$ %{ENV:BASE}index.php [NC,L]\n"
  },
  {
    "path": "public/index.php",
    "content": "<?php\n/**\n * @license   http://opensource.org/licenses/BSD-3-Clause BSD-3-Clause\n * @copyright Copyright (c) 2014-2016 Zend Technologies USA Inc. (http://www.zend.com)\n */\n\nuse Zend\\Stdlib\\ArrayUtils;\nuse ZF\\Apigility\\Application;\n\n/**\n * This makes our life easier when dealing with paths. Everything is relative\n * to the application root now.\n */\nchdir(dirname(__DIR__));\n\n// Redirect legacy requests to enable/disable development mode to new tool\nif (php_sapi_name() === 'cli'\n    && $argc > 2\n    && 'development' == $argv[1]\n    && in_array($argv[2], ['disable', 'enable'])\n) {\n    // Windows needs to execute the batch scripts that Composer generates,\n    // and not the Unix shell version.\n    $script = defined('PHP_WINDOWS_VERSION_BUILD') && constant('PHP_WINDOWS_VERSION_BUILD')\n        ? '.\\\\vendor\\\\bin\\\\zf-development-mode.bat'\n        : './vendor/bin/zf-development-mode';\n    system(sprintf('%s %s', $script, $argv[2]), $return);\n    exit($return);\n}\n\n// Decline static file requests back to the PHP built-in webserver\nif (php_sapi_name() === 'cli-server' && is_file(__DIR__ . parse_url($_SERVER['REQUEST_URI'], PHP_URL_PATH))) {\n    return false;\n}\n\nif (! file_exists('vendor/autoload.php')) {\n    throw new RuntimeException(\n        'Unable to load application.' . PHP_EOL\n        . '- Type `composer install` if you are developing locally.' . PHP_EOL\n        . '- Type `vagrant ssh -c \\'composer install\\'` if you are using Vagrant.' . PHP_EOL\n        . '- Type `docker-compose run apigility composer install` if you are using Docker.'\n    );\n}\n\n// Setup autoloading\ninclude 'vendor/autoload.php';\n\n$appConfig = include 'config/application.config.php';\n\nif (file_exists('config/development.config.php')) {\n    $appConfig = ArrayUtils::merge(\n        $appConfig,\n        include 'config/development.config.php'\n    );\n}\n\n// Run the application!\nApplication::init($appConfig)->run();\n"
  },
  {
    "path": "public/web.config",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<configuration>\n    <system.webServer>\n        <rewrite>\n            <rules>\n                <rule name=\"Imported Rule 1\" stopProcessing=\"true\">\n                    <match url=\"^.*$\" />\n                    <conditions logicalGrouping=\"MatchAny\">\n                        <add input=\"{REQUEST_FILENAME}\"\n                             matchType=\"IsFile\" pattern=\"\"\n                             ignoreCase=\"false\" />\n                        <add input=\"{REQUEST_FILENAME}\"\n                             matchType=\"IsDirectory\"\n                             pattern=\"\"\n                             ignoreCase=\"false\" />\n                    </conditions>\n                    <action type=\"None\" />\n                </rule>\n                <rule name=\"Imported Rule 2\" stopProcessing=\"true\">\n                    <match url=\"^.*$\" />\n                    <action type=\"Rewrite\" url=\"index.php\" />\n                </rule>\n            </rules>\n        </rewrite>\n    </system.webServer>\n</configuration>"
  },
  {
    "path": "src/Apigility/constants.php",
    "content": "<?php\n/**\n * @license   http://opensource.org/licenses/BSD-3-Clause BSD-3-Clause\n * @copyright Copyright (c) 2016 Zend Technologies USA Inc. (http://www.zend.com)\n */\n\nnamespace Apigility;\n\nconst VERSION = '1.5.1dev';\n"
  }
]