Download the PHP package shayanderson/exo without Composer

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

Exo // Next-Gen Eco Framework

Classes

Functions

Classes

Exo\App\Cli

Cli is a CLI helper. The Exo\Factory::cli() will only return a Exo\App\Cli object if used with the CLI, all non-CLI usage will return null.

These examples use the Exo\Factory helper function app().

By default the SCRIPT and COMMAND keys are automatically set based on the php [SCRIPT] [COMMAND] ...options pattern. This default pattern can be changed by using the map() method, example using the same command in the example above:

Output

A CLI output helper can be used like:

Arrays are supported:

Output messages on the same line:

An output buffer can be used:

Output using color:

Output using indent:

Using other methods (like colors and indent) with the prepend() method:

Confirm

Confirm example:

Methods

Light color methods are: colorLightBlue(), colorLightCyan(), colorLightGray(), colorLightGreen(), colorLightMagenta(), colorLightRed(), colorLightYellow()

Exo\App\Env

Env is an application environment variables helper. Keys are case-sensitive.

This example uses the helper function app().

Example .env file:

Example usage:

PHP environment variables from $_ENV (prefixed with ENV.) and $_SERVER (prefixed with SERVER.) are also accessible, example:

Methods

Exo\App\Http\Request

Request is an HTTP request helper.

These examples use the Exo\Factory helper function app().

Example POST request:

Example GET request:

Session in request example:

Session flash can be used to store short-term data where the data is available from when set through the following request, example:

Cookie in request example:

Methods

Exo\App\Http\Response

Response is an HTTP response helper.

These examples use the Exo\Factory helper function app().

Methods

All methods return Exo\App\Http\Response, unless otherwise stated.

Exo\Entity

Entity is an object helper.

The apply() method can be used to apply a callback to a property value, example:

The bind() method can be used to bind an external Entity reference to objects or arrays, example:

The Property voidable() method allows a property to be missing from the entity. This differs from the validator rule optional because optional requires the property to be present. If a property is voidable the default value will not be used when using the toArray() method and using allow voidables. Example usage for the property createdAt that may only be set once (during create operation):

The Entity voidable() method allows all properties to be missing from the entity, unless a property uses the notVoidable() method. Example:

Methods

trait Exo\Event

Event is an event helper.

Callable Chain

Multiple callables can be bound to the same event:

Returning true from any bound callable will interrupt the chain of callables:

Exo\Exception

Exceptions can be improved by using or extending the Exo\Exception class, or the other available Exo\App\Http\Exception\* exception classes. Example:

Exceptions can be handled using the Exo\Exception class:

Exo\Factory

The Exo factory is a factory helper that can be inherited.

Methods

Exo\Factory\Annotation

Annotation is a class loading helper that utilizes class annotations.

Singleton Pattern

Use the singleton pattern in factory classes by inheriting the Exo\Factory\Singleton class:

Inheritance Chain

Helper Function

Helper function example:

Exo\Factory\Dynamic

Dynamic class factory.

If a class doesn't exist an exception (Exo\Exception) with be thrown, use try/catch to handle missing classes:

Exo\Factory\Mapper

Mapper is a class loading helper.

Singleton Pattern

Use the singleton pattern in factory classes by inheriting the Exo\Factory\Singleton class:

Helper Function

Helper function example:

Exo\Factory\Singleton

Singleton is a singleton pattern helper.

Helper Function

Helper function example:

Exo\Logger

Logger is a logging helper.

This example uses the Exo\Factory helper function app().

Example custom log handler:

The debug() method can be used with or without a message, and with or without context. Example:

Methods

Exo\Map

Map is a helper class for handling arrays. Map implements Countable and Iterator.

Methods

Exo\Model

Model is a model helper class that can be used with Exo\Entity objects.

For reference see Exo\Entity example above

Methods

Exo\Options

Options is a helper class for handling options with validation.

Usage example:

Methods

Exo\Share

Share is a global key/value helper.

Methods

Exo\Validator

Validator is a validation helper.

Optional

Custom Messages

Use custom validation exception messages:

Also a singe validation message can be used for an entire group:

Assert Callback

Use callback with assert() method:

Custom Rules

Use custom rule:

Validate Method

Usage with validate() method instead:

Use Custom Assertion Exception Class

A custom exception class can be used instead of the default Exo\Validator\Exception class when an assertion fails, example:

Display Value in Assertion Exception Message

The value that fails validation can be displayed in the assertion exception message for debugging purposes:

Types & Rules

Functions

bind(): string

Formatted string helper.

Any depth beyond the allowed depth of two is auto-serialized, example:

debug($message = null, $context = null): \Exo\Logger

Logger debug alias.

env(string $key, $default)

The env() function is a getter helper function for Env.

logger(string $channel = ''): \Exo\Logger

Logger helper function.

pa(...$values): void

HTML and CLI friendly printer for all PHP types.

share(string $key, $value)

The share() function is a getter/setter helper function for Share.

token(int $length = 32): string

Generate tokens:


All versions of exo with dependencies

PHP Build Version
Package Version
No informations.
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 shayanderson/exo contains the following files

Loading the files please wait ....