Download the PHP package jaxon-php/jaxon-yii without Composer
On this page you can find all versions of the php package jaxon-php/jaxon-yii. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Informations about the package jaxon-yii
Jaxon integration for the Yii framework
This package integrates the Jaxon library into the Yii framework. It requires the version 2.0.11 or newer.
Installation
Add the following lines in the composer.json
file, and run the composer update
command.
Or run the composer require jaxon-php/jaxon-yii
command.
This package provides a filter that must be attached to routes to pages where the Jaxon features are enabled.
This is an example of a Yii controller using the Jaxon library.
Before it prints the page, the controller calls the $jaxon->css()
, $jaxon->js()
and $jaxon->script()
functions,
to get the CSS and javascript codes generated by Jaxon which are inserted into the page.
Configuration
The Jaxon library settings are defined in the @app/config/jaxon.php
file, and separated into two sections.
The options in the lib
section are those of the Jaxon core library, while the options in the app
sections are those of the Jaxon application.
The following options can be defined in the app
section of the config file.
Name | Description | |
---|---|---|
directories | An array of directory containing Jaxon application classes | |
views | An array of directory containing Jaxon application views | |
By default, the views
array is empty. Views are rendered from the framework default location.
There's a single entry in the directories
array with the following values.
Name | Default value | Description |
---|---|---|
directory | @app/jaxon/classes | The directory of the Jaxon classes |
namespace | \Jaxon\App | The namespace of the Jaxon classes |
separator | . | The separator in Jaxon class names |
protected | empty array | Prevent Jaxon from exporting some methods |
Usage
The Jaxon classes
The Jaxon classes can inherit from \Jaxon\App\CallableClass
.
By default, they are located in the @app/jaxon/ajax
dir of the Yii application, and the associated namespace is \Jaxon\Ajax
.
This is an example of a Jaxon class, defined in the @app/jaxon/ajax/HelloWorld.php
file.
Contribute
- Issue Tracker: github.com/jaxon-php/jaxon-yii/issues
- Source Code: github.com/jaxon-php/jaxon-yii
License
The package is licensed under the BSD license.