Download the PHP package zfmastery/ze-static-pages without Composer

On this page you can find all versions of the php package zfmastery/ze-static-pages. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package ze-static-pages

Zend Expressive Static Pages Module

An easy, almost painless, way to render static pages in Zend Expressive applications.

So many projects will have a number of static pages, pages that require no template variable interpolation or any other form of logic. Given that it should be as simple as possible to just render as many as you need with a minimum of fuss and effort. However, by default, you have to either code this yourself; worse case scenario, you may end up creating loads of code, just to render static content. The intent of the module is to take all that effort away. All you need to do is:

At this stage, the project is still under heavy development. So there are no further instructions. But, they will follow shortly.

How it Works

This module aims to make organising and rendering static content as simple as possible. It does so by using the route's name to determine the template to render. In the example below, you can see that it defines a new route, called /disclosure. The route uses StaticPagesAction::class as the handling middleware and has the name static.disclosure.

The name is important, as it infers the name of the template which StaticPagesAction will attempt to render. Specifically, it will attempt to render disclosure.phtml. So you can see that the route’s name is the template’s name, minus the .phtml extension, and prefixed with static..

At this point, as the module’s quite new, the template directory that is searched, templates/static-pages, is fixed, and all templates need to be in the top-level of that directory. What’s more, it’s not been tested with other template rendering engines. However, these are expected to change in an upcoming release.

Getting Started / Installing

To install the module, use Composer by running composer require zfmastery/ze-static-pages. The current release doesn't support automatic creation of the required module configuration file, nor of the template directory. That is planned for a future release however.

Given that:

  1. Copy the default config file config/static-pages.global.php to your Zend Expressive's config/autoload/ directory.
  2. In the root directory, create the directory structure templates/static-pages/ and in there create your static templates files.
  3. Add routes to use your new static templates.

Running the Tests

To run the unit tests, run composer test.


All versions of ze-static-pages with dependencies

PHP Build Version
Package Version
Requires php Version ^5.6 || ^7.0
roave/security-advisories Version dev-master
zendframework/zend-expressive Version ^2.0.2
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package zfmastery/ze-static-pages contains the following files

Loading the files please wait ....