spoom-php / core
Utility core of the Spoom Packages
Installs: 45
Dependents: 4
Suggesters: 0
Security: 0
Stars: 0
Watchers: 2
Forks: 0
Open Issues: 0
Type:spoom
Requires
- php: ^7.2.0
- ext-fileinfo: *
- ext-json: *
- ext-mbstring: *
- spoom-php/composer: ^1.1.1
Requires (Dev)
- phpmd/phpmd: @stable
- phpunit/phpunit: ^8.0
- squizlabs/php_codesniffer: @stable
This package is auto-updated.
Last update: 2025-04-29 00:57:46 UTC
README
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.