Download the PHP package joomla/application without Composer

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

The Application Package Build Status

Latest Stable Version Total Downloads Latest Unstable Version License

Initialising Applications

AbstractApplication implements an initialise method that is called at the end of the constructor. This method is intended to be overridden in derived classes as needed by the developer.

If you are overriding the __construct method in your application class, remember to call the parent constructor last.

Logging within Applications

AbstractApplication implements the Psr\Log\LoggerAwareInterface so is ready for intergrating with an logging package that supports that standard.

The following example shows how you could set up logging in your application using initialise method from AbstractApplication.

The logger variable is private so you must use the getLogger method to access it. If a logger has not been initialised, the getLogger method will throw an exception.

To check if the logger has been set, use the hasLogger method. This will return true if the logger has been set.

Consider the following example:

Mocking the Application Package

For more complicated mocking where you need to similate real behaviour, you can use the Application\Tests\Mocker class to create robust mock objects.

There are three mocking methods available:

  1. createMockBase will create a mock for AbstractApplication.
  2. createMockCli will create a mock for AbstractCliApplication.
  3. createMockWeb will create a mock for AbstractWebApplication.

The createMockWeb method will return a mock with the following methods mocked to roughly simulate real behaviour albeit with reduced functionality:

You can provide customised implementations these methods by creating the following methods in your test class respectively:

Web Application

Configuration options

The AbstractWebApplication sets following application configuration:

and uses following ones during object construction:

The setHeader method

Accepted parameters

Example: Using WebApplication::setHeader to set a status header.

Will result in response containing header

Command Line Applications

The Joomla Framework provides an application class for making command line applications.

An example command line application skeleton:

Colors for CLI Applications

It is possible to use colors on an ANSI enabled terminal.

You can also create your own styles.

Available foreground and background colors are: black, red, green, yellow, blue, magenta, cyan and white.

And available options are: bold, underscore, blink and reverse.

You can also set these colors and options inside the tagname:

Installation via Composer

Add "joomla/application": "~2.0" to the require block in your composer.json and then run composer install.

Alternatively, you can simply run the following from the command line:

If you want to include the test sources, use


All versions of application with dependencies

PHP Build Version
Package Version
Requires php Version ^8.1.0
psr/log Version ^1.0|^2.0|^3.0
psr/http-message Version ^1.0
joomla/event Version ^3.0
joomla/registry Version ^3.0
laminas/laminas-diactoros Version ^2.24.0
symfony/deprecation-contracts Version ^2|^3
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 joomla/application contains the following files

Loading the files please wait ....