a15lam/workspace

A library of commonly used classes and utilities.

0.1.1 2018-06-23 15:48 UTC

This package is auto-updated.

Last update: 2024-12-29 04:43:40 UTC


README

A library of all classes that are commonly used in my other libraries/projects. This library is intended for my personal use in order to make life a little easier. When I work on this I am only thinking about myself and no one else. That being said, you are welcome to use it on your own.

Usage

Configuration

Overwrite the Workspace class in your project and set your PHP config file in Workspace::$configInfo. Default is DIR . '/../config.php'. Once the file path is set you can get a config value like below.

//This is your overwritten version of Workspace class where you set the config file.
Workspace::config()->get('config-name-here');

Logger

Overwrite the Workspace class in your project and set your log path in Workspace::$logPath . Default is DIR . '/../storage/logs/. Once the log path is set you get start using the logger like below.

//This is your overwritten version of Workspace class where you set the config file.
Workspace::log()->warn('message');
Workspace::log()->error('message');
Workspace::log()->info('message');
Workspace::log()->debug('message');