Download the PHP package wikimedia/codex without Composer

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

Wikimedia Codex

A PHP library for generating markup for Codex CSS-only components using a builder-based methodology. This library leverages the Codex design system, providing a PHP-based interface to create UI components that ensure visual consistency. It follows a builder pattern approach to construct UI components directly in PHP.

Installation

Use Composer to install the Codex library:

Construction Methodology

Codex uses the Fluent Builder Pattern to allow developers to create and configure UI components in a highly readable and intuitive manner. This pattern follows a create → build → render sequence that allows methods to progressively customize components before rendering.

How It Works

  1. Create: Begin by calling a builder method to initialize a new component, for example, $codex->Accordion().
  2. Configure: Chain configuration methods to customize the component's attributes, such as setTitle(), setDescription(), or setContent().
  3. Render: Finally, call the build()->getHtml() method to get the rendered HTML for the component.

Example

This pattern allows for a structured and clear way to build complex UI components with minimal effort, making the codebase both efficient and readable.

Available Components

The Codex library provides a variety of components to build UI:

Usage

Here is a basic example of how to use the Codex library:

Usage in MediaWiki

Here is a basic example of how to use the Codex library in MediaWiki:

Example Usage of WebRequestAdapter and WebRequestCallbacks

This example demonstrates how to use the WebRequestAdapter and WebRequestCallbacks classes to adapt $_GET parameters for use with the Codex library.

Create a SimpleWebRequest Class

The SimpleWebRequest class implements the IWebRequest interface from the Codex design system. It simulates a basic request object that stores $_GET parameters, providing a standardized way to retrieve these parameters in accordance with the Codex interface. This class allows for consistent access to request data, ensuring flexibility and adherence to the expected behavior of Codex components.

Adapt the SimpleWebRequest for Codex

Use the WebRequestAdapter to adapt the SimpleWebRequest object, making it compatible with Codex components.

Initialize WebRequestCallbacks

Finally, initialize the WebRequestCallbacks with the adapted request to handle request parameters consistently.

With this setup, $callbacks can be used within Codex components to manage $_GET parameters consistently across the application.

Scripts

The following scripts are defined for testing and code fixing purposes:

Example usage:

License

This project is licensed under the GPL-2.0-or-later. See the LICENSE file for details.

Contributing

Please read the CONTRIBUTING file for details on our code of conduct, and the process for submitting pull requests to us.

Bugs

Report bugs at Phabricator.

Homepage

For more information, visit the homepage.


All versions of codex with dependencies

PHP Build Version
Package Version
Requires php Version ^7.4 || ^8.0
ext-json Version *
ext-intl Version *
krinkle/intuition Version ^2.3
mustache/mustache Version ^2.14
ezyang/htmlpurifier Version ^4.17
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 wikimedia/codex contains the following files

Loading the files please wait ....