# Guides

# What is PHP-Prefixer?

PHP-Prefixer is a service to apply PHP prefixes to namespaces, functions, helpers, traits, interfaces, etc. Start with a Composer project and a set of dependencies, and prefix all library files at once to generate a consistent prefixed codebase.

PHP-Prefixer abstracts the complexity of manually applying prefixes to PHP files. The service automates and streamlines the process of prefixing with the scalability and simplicity of serverless computing.

PHP-Prefixer is a rule-based expert system that processes the project and dependencies iteratively to prefix every project file.

Given this sample class declaration:

namespace ACME\Carbon;

use ACME\Carbon\Exceptions\InvalidDateException;
use DateInterval;
use ACME\Symfony\Component\Translation;

class Carbon extends DateTime
{
    const NO_ZERO_DIFF = 01;
...

The associated prefixed class declaration, with a new and distinct namespace ACME:

namespace ACME\Carbon;

use ACME\Carbon\Exceptions\InvalidDateException;
use DateInterval;
use ACME\Symfony\Component\Translation;

class Carbon extends DateTime
{
    const NO_ZERO_DIFF = 01;
...

# The Guides

These are a series of guides to learn how to use the PHP-Prefixer service. Each guide is designed to introduce a set of features, present the prefixing functionality, and take advantage of configuration settings.

  1. Getting Started
  2. How to Prefix a WordPress Plugin
  3. How to Prefix a Joomla Module
  4. How to Prefix a PrestaShop Module

If you have any questions or we can do to help in anyway, please, contact us (opens new window), and we’ll get back to you shortly. We will be happy to provide technical assistance and guide you to get the best out of PHP-Prefixer.

# Using Composer Libraries in the Cloud

Composer (opens new window) is a dependency management tool in PHP. It allows you to declare the libraries your project depends on and manages (install/update) them for you. Working in tandem with Composer, Packagist (opens new window) is the central Composer repository. It aggregates public PHP packages installable with Composer.

Composer was initially designed to work as a standalone tool for developers working separately. The coordination of the usage of libraries is a case that must be solved via other means.

The prefixing of PHP is a practical solution that can help to sort out the use case. PHP-Prefixer is an automated online service, powered by a complex rule-based system that implements the prefixing of Composer dependencies. The service is a cloud computing processing system, offering on-demand resources to process general PHP packages. The service doesn’t need to be installed on each user’s computer, can be accessed from different locations, and doesn’t require the complex configurations of software or hardware.