Download the PHP package herrera-io/silex-bootstrap without Composer

On this page you can find all versions of the php package herrera-io/silex-bootstrap. 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 silex-bootstrap

Silex Bootstrap

Build Status

This is a pre-made web application built on the Silex micro-framework and the Bootstrap front-end framework. The web application is ready to launch and requires minor alterations to get a new project up and running. I suggest acquiring a solid understanding of Silex and Bootstrap before proceeding.

To create a new project, run:

Configuration

Locations

First, you need to know that parameters, services, and routes are configured by using YAML configuration files. These files are loaded through the WiseServiceProvider service provider in the default environment, prod:

If you know how the service provider works, you will also know that you can completely change the file format used. Instead of using YAML, you can use JSON, XML, INI, or just plain PHP. YAML was used since most of this bootstrap project is already based on Symfony, which heavily uses YAML.

What Where
parameters app/config/parameters.yml
services app/config/services.yml
routes app/config/routes.yml

For all other environments that are not named prod, configuration files will have the name of their environment appended to the end of them, but before the file extension:

What Where
parameters app/config/parameters_*.yml
services app/config/services_*.yml
routes app/config/routes_*.yml

Environments

The active environment is controlled by the APP_MODE environment variable. When the variable is not set, the default value of prod is used. Currently, the web application only recognizes three environments:

If you intend to use dev, test, or any other mode intended for debugging or testing, you will also want to set the APP_DEBUG variable to 1 (one). This will enable debugging mode in Silex.

Configuring

The parameters.yml file defines the application-wide parameters that are set directly in the Silex instance. Because of how parameters are set in Silex, you must be careful not to accidentally replace services that use the same name as one or more of your parameters.

Once the application-wide parameters have been loaded and set, services are registered from services.yml, followed by the routes in routes.yml. To understand how these are configured, you must read up on the documentation for the WiseServiceProvider.

Defaults

These are the services registered by default:

The following services are also registered when the dev environment is used:

The test environment will actually unregister the WebProfilerServiceProvider.

Customizing

The Herrera\Silex\Application class uses three methods for loading parameters, services, and routes. These methods can be replaced or extended if configuring through files is found to be inadequate.

It is likely that you will find that you cannot properly register one or more services through a configuration file. For cases such as these, you will want to do something like the following in your own Application subclass:

You may also just modify the application class in src/lib/Herrera/Silex/Application, instead of creating a new subclass. This may be more convenient for you, but it could complicate maintenance when updates are released to this project.

If you create your own subclass, you will need to modify a few instances where the original class is used:

  1. In src/lib/Herrera/Silex/Test/TestCase.php, you will need to modify the TestCase->createApplication() method so that it returns an instance of your class, instead of the default one.
  2. In web/index.php, you will need to modify the call to the method Herrera\Silex\Application::create() so that it calls the same method on your class: Example\Subclass::create()

Console

The web application provides console support through the Go build tool. You can add, edit, and remove your own tasks by editing the Gofile in the root directory.

These are the default tasks:

Command Description
app:clear Removes the contents of app/cache and app/logs.
app:clear:cache Removes the contents of app/cache.
app:clear:logs Removes the contents of app/logs.
app:generate:docs Uses Sami to generate API documentation.
app:minify Uses Minify to minify JS and CSS assets.
app:run Runs your web application using the built-in server.
app:test Uses PHPUnit to execute the test suite.

Sami

By default, the Sami settings are in app/config/docs.php. Sami is configured so that the parsed data is stored in app/cache/docs, while the final rendered result is stored in docs/ in the root directory.

To generate the API documentation:

Minify

By default, the list of assets to minify is in app/config/assets.yml. The file is organized as an associative array. The key is the path where the minified file will be saved, and the value is an array of paths that will be minified.

To minify assets:

PHPUnit

By default, the test cases are kept in src/tests. PHPUnit is also configured to automatically load classes from that directory if they are not present in the src/lib directory.

To launch PHPUnit:

To generate code coverage, simply pass the option --coverage (or -c). The task will take care of configuring PHPUnit so that the generated HTML coverage report is stored in app/cache/coverage.

Translations

By default, translation files are stored in app/translations. Also by default, the following translation files are registered with the translation service provider:

To use your own translation files, I recommend reading the documentation on the TranslationServiceProvider service provider. The service provider will allow you do other things such as specify which loader class you need to register in order to load your translation files. This means you can use other formats, such as XLIFF, instead of YAML.

Front-End

The front-end is built using the following:

A custom form theme has also been supplied to make using the horizontal form design very simple to use. All form types recognized by Bootstrap are supported by the theme.


All versions of silex-bootstrap with dependencies

PHP Build Version
Package Version
Requires php Version >=5.4.0
herrera-io/silex-active-link Version ~1.0
herrera-io/silex-translation-files Version ~1.1
herrera-io/silex-wise Version ~2.0
monolog/monolog Version ~1.6
silex/silex Version ~1.0
symfony/config Version ~2.3
symfony/form Version ~2.3
symfony/translation Version ~2.3
symfony/twig-bridge Version ~2.3
symfony/validator Version ~2.3
symfony/yaml Version ~2.3
twig/twig Version ~1.9
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 herrera-io/silex-bootstrap contains the following files

Loading the files please wait ....