Trait CoreTrait
Direct Known Users
Author: Brian Dayhoff mopsyd@me.com
Requires: \oroboros\core\interfaces\api\UtilityApi
Located at core/traits/CoreTrait.php
Methods summary
public
|
|
public
|
|
public
|
|
public static
|
|
public static
|
|
public static
string|boolean
|
#
filepath( string|
Returns a system-compliant absolute file path from a supplied relative path, or alternately from the location it was called. NOTE: DO NOT USE WITHOUT SUPPLYING A PATH IN CLOSURES. If used in a closure, pass DIR as the path, or it will throw an exception. |
public static
|
#
getLoggerObject( Psr\Log\LoggerInterface $logger,… )
Returns a new instance of the logger, already initialized to the current core settings. You may use this to quickly grab a logger instance from anywhere. Individual instances are prototyped against the CURRENT GLOBAL LOGGER. This is not a singleton, so you will need to check that you have the one you need, otherwise use the factory to build one. |
public static
|
#
setAutoloader(
|
public static
|
#
setLoggerObject( Psr\Log\LoggerInterface $logger )
Sets a logger object. Must implement the Psr-3 logger interface |
public static
type
|
|
public static
type
|
|
private static
|
|
private static
|
|
private static
|
Properties summary
private static
array
|
$_log_modes
|
#
array(
"default" => self::LOGGER_DEFAULT,
"file" => self::LOGGER_FILE,
"database" => self::LOGGER_DATABASE,
"null" => self::LOGGER_NULL,
"screen" => self::LOGGER_SCREEN,
"cli" => self::LOGGER_CLI,
"css" => self::LOGGER_CSS,
"js" => self::LOGGER_JS,
"ajax" => self::LOGGER_AJAX,
)
|
private static
array
|
$_valid_log_levels
|
#
[
\Psr\Log\LogLevel::EMERGENCY,
\Psr\Log\LogLevel::ALERT,
\Psr\Log\LogLevel::CRITICAL,
\Psr\Log\LogLevel::ERROR,
\Psr\Log\LogLevel::WARNING,
\Psr\Log\LogLevel::NOTICE,
\Psr\Log\LogLevel::INFO,
\Psr\Log\LogLevel::DEBUG,
]
|
private static
|
$_env
|
|
private static
boolean
|
$_initialized
|
#
false
|
private static
|
$_logger
|
|
private static
|
$_autoloader
|
|
private static
array
|
$_settings
|
#
array()
|
private static
|
$_codex
|
|
private static
|
$_mode
|
|
private static
array
|
$_valid_modes
|
#
array()
|