Download the PHP package jaxon-php/jaxon-symfony without Composer

On this page you can find all versions of the php package jaxon-php/jaxon-symfony. 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 jaxon-symfony

Jaxon integration for Symfony

This package integrates the Jaxon library into the Symfony framework.

Installation

Add the following lines in the composer.json file, and run the composer update command.

Or run the composer require jaxon-php/jaxon-symfony ^5.0 command.

Add the Jaxon bundle in the config/bundle.php file.

Create and edit the packages/config/jaxon.yaml file to suit the needs of your application. A sample config file is available in this repo.

Add the following settings in the config/services.yaml file, to configure the Jaxon library.

This config file by default registers Jaxon classes in the jaxon/ajax directory with the \Jaxon\Ajax namespace.

The Jaxon library must be setup on all pages that need to show Jaxon related content, using an event subscriber for example.

Define a controller action to process Jaxon ajax requests.

Insert Jaxon js and css codes in the pages that need to show Jaxon related content, using the Twig functions provided by the Jaxon bundle.

Configuration

The settings in the config/package/jaxon.yml config file are 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 Symfony 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 jaxon/ajax The directory of the Jaxon classes
namespace \Jaxon\Ajax The namespace of the Jaxon classes
separator . The separator in Jaxon js 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 jaxon/ajax dir of the Symfony application, and the associated namespace is \Jaxon\Ajax.

This is a simple example of a Jaxon class, defined in the jaxon/Ajax/HelloWorld.php file.

Dependency injection

Services in Symfony can be declared as public or private, and injected in Jaxon classes.

Since Jaxon uses a container to fetch to the Symfony services that are injected in his classes, by default it will be able to get access only to services declared as public.

A service locator can be defined for Jaxon in the config/services.yaml file, in order to provide access to private services.

The service locator must be declared as public, and take all the services that can be passed to Jaxon classes as arguments. See the Symfony service locators documentation.

Contribute

License

The package is licensed under the BSD license.


All versions of jaxon-symfony with dependencies

PHP Build Version
Package Version
Requires jaxon-php/jaxon-core Version ^4.0
symfony/framework-bundle Version 5.*|6.*
symfony/expression-language Version *
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 jaxon-php/jaxon-symfony contains the following files

Loading the files please wait ....