Utility core of the Spoom Packages

Installs: 45

Dependents: 4

Suggesters: 0

Security: 0

Stars: 0

Watchers: 3

Forks: 0

Open Issues: 0

Type:spoom

v1.0.0-alpha.1 2019-09-29 23:02 UTC

This package is auto-updated.

Last update: 2024-04-29 03:44:21 UTC


README

Build Status

Spoom Packages

Spoom is a collection of cooperative packages, which you can use to code your Application of needs.

About the Core

This is the core package which provide:

  • Extended exception capabilities with string id and context support
  • File access interface and local filesystem implementation
  • Logger interface with file logger implementation
  • Data serialization and deserialization interface (with serialize and json implementation)
  • Helpers to solve basic task and some PHP inconsistency
  • Event and package (Spoom packages) management
  • ...

Installation

Install the latest version with

$ composer require spoom-php/core

Requirements

Spoom Core (and most official package) works with PHP 7.2 or above

Usage

Here is a basic example to initialize the Core\Environment:

<?php require __DIR__ . '/vendor/autoload.php';

use Spoom\Core\Environment;
use Spoom\Core\File;

// create an environment (if you wish, it's also optional in most cases) to store some globals for your application. Storing it in a variable is
// optional, you can access the application anywhere using the `Environment::instance()` static method
$spoom = new Environment(

  // used environment's name
  Environment::DEVELOPMENT,

  // root directory of the application
  new File( __DIR__ )
);

// do something fancy..

License

The Spoom is open-sourced software licensed under the MIT license.