Download the PHP package icanboogie/bind-view without Composer
On this page you can find all versions of the php package icanboogie/bind-view. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download icanboogie/bind-view
More information about icanboogie/bind-view
Files in icanboogie/bind-view
Package bind-view
Short Description Binds icanboogie/view to ICanBoogie
License BSD-3-Clause
Homepage https://icanboogie.org/
Informations about the package bind-view
bind-view
The icanboogie/bind-view package binds icanboogie/view to ICanBoogie, using its autoconfig feature. It add getters to controllers and views, making it easy to invoke views from controller actions or obtain template engines and resolve templates from views, using features of icanboogie/render.
Views and controllers
Views are associated with controllers through the lazy getter view
, thus a simple $this->view
is all that is required to enable view features inside a controller. The view then waits for
the Controller::action
event to perform its rendering.
The View instance is created with the controller and the Renderer instance returned by get_renderer()
.
The following example demonstrates how a query of some articles is set as the view content, a title is also added to the view variables:
Note: The
model
getter is provided by the icanboogie/module package, and is only available if the route has amodule
property, which is automatic for routes defined by modules.
For more information continue to the View documentation.
Requirements
The package requires PHP 5.6 or later.
Installation
The recommended way to install this package is through Composer:
Cloning the repository
The package is available on GitHub, its repository can be cloned with the following command line:
$ git clone https://github.com/ICanBoogie/bind-view.git
Documentation
The package is documented as part of the ICanBoogie framework
documentation. You can generate the documentation for the package and its dependencies with the make doc
command. The documentation is generated in the build/docs
directory. ApiGen is required. The directory can later be cleaned with the make clean
command.
Testing
The test suite is ran with the make test
command. PHPUnit and Composer need to be globally available to run the suite. The command installs dependencies as required. The make test-coverage
command runs test suite and also creates an HTML coverage report in "build/coverage". The directory can later be cleaned with the make clean
command.
The package is continuously tested by Travis CI.
License
icanboogie/bind-view is licensed under the New BSD License - See the LICENSE file for details.
All versions of bind-view with dependencies
icanboogie/icanboogie Version ^4.0
icanboogie/bind-render Version ^0.6
icanboogie/view Version ^0.9