ICanBoogie/ICanBoogie v2.3.1
  • Namespace
  • Class

Namespaces

  • ICanBoogie
    • Autoconfig
    • Core
    • HTTP
      • Dispatcher
    • Session

Classes

  • Core
  • Debug
  • Helpers
  • Logger
  • LogLevel
  • Session

Interfaces

  • LoggerInterface

Traits

  • LoggerTrait

Exceptions

  • AlreadyAuthenticated
  • AuthenticationRequired
  • CoreAlreadyBooted
  • CoreAlreadyInstantiated
  • CoreNotInstantiated
  • PermissionRequired
  • SecurityException

Constants

  • TOKEN_ALPHA
  • TOKEN_ALPHA_UPCASE
  • TOKEN_NUMERIC
  • TOKEN_SYMBOL
  • TOKEN_SYMBOL_WIDE

Functions

  • app
  • boot
  • excerpt
  • generate_token
  • generate_token_wide
  • get_autoconfig
  • log
  • log_error
  • log_info
  • log_success
  • log_time
  • normalize_namespace_part
  • pbkdf2
  • resolve_app_paths
  • strip_root

Class Core

Core of the framework.

ICanBoogie\Object
Extended by ICanBoogie\Core
Namespace: ICanBoogie
Located at Core.php

Methods summary

public static ICanBoogie\Core
# get( )

Returns the unique instance of the core object.

Returns the unique instance of the core object.

Returns

ICanBoogie\Core
The core object.
public
# __construct( array $options = [] )

Constructor.

Constructor.

Parameters

$options
Initial options to create the core object.

Throws

ICanBoogie\CoreAlreadyInstantiated
in attempt to create a second instance.
protected
# create_config_manager( $path_list, $constructors )
protected ICanBoogie\Storage\FileStorage
# lazy_get_vars( )

Returns the non-volatile variables registry.

Returns the non-volatile variables registry.

Returns

ICanBoogie\Storage\FileStorage
protected array
# lazy_get_config( )

Returns the core configuration.

Returns the core configuration.

Returns

array
protected HTTP\Dispatcher
# get_dispatcher( )

Returns the dispatcher used to dispatch HTTP requests.

Returns the dispatcher used to dispatch HTTP requests.

Returns

HTTP\Dispatcher
protected ICanBoogie\HTTP\Request
# lazy_get_initial_request( )

Returns the initial request object.

Returns the initial request object.

Returns

ICanBoogie\HTTP\Request
protected ICanBoogie\HTTP\Request
# get_request( )

Returns the current request.

Returns the current request.

Returns

ICanBoogie\HTTP\Request
protected string
# get_language( )

Returns the locale language.

Returns the locale language.

Returns

string
protected
# set_timezone( TimeZone|string|integer $timezone )

Sets the working time zone.

Sets the working time zone.

When the time zone is set the default time zone is also set with date_default_timezone_set().

Parameters

$timezone

An instance of TimeZone, the name of a time zone, or numeric equivalent e.g. 3600.

protected TimeZone
# get_timezone( )

Returns the working time zone.

Returns the working time zone.

If the time zone is not defined yet it defaults to the value of date_default_timezone_get() or "UTC".

Returns

TimeZone
protected
# get_is_booted( )
protected
# get_is_booting( )
public
# boot( )

Boot the modules and configure Debug, Prototype and Events.

Boot the modules and configure Debug, Prototype and Events.

The boot event of class ICanBoogie\Core\BootEvent is fired after the boot is finished.

The ICANBOOGIE_READY_TIME_FLOAT key is added to the $_SERVER super global with the micro-time at which the boot finished.

Throws

ICanBoogie\CoreAlreadyBooted
in attempt to boot the core twice.
public
# __invoke( )

Run the application.

Run the application.

In order to avoid error messages triggered by PHP fatal errors to be send with a 200 (Ok) HTTP code, the HTTP code is changed to 500 before the core is run (and booted). When the process runs properly the HTTP code is changed to the appropriate value by the response.

The boot() method is invoked if the core has not booted yet.

protected
# run( ICanBoogie\HTTP\Request $request )

Fires the ICanBoogie\Core::run event.

Fires the ICanBoogie\Core::run event.

Parameters

$request
protected
# terminate( ICanBoogie\HTTP\Request $request, ICanBoogie\HTTP\Response $response )

Terminate the application.

Terminate the application.

The method throws the ICanBoogie\Core::terminate event of class ICanBoogie\Core\TerminateEvent.

Parameters

$request
$response
public string
# generate_path( string|ICanBoogie\Routing\Route $pattern_or_route_id_or_route, array $params = null )

Generates a path with the specified parameters.

Generates a path with the specified parameters.

Parameters

$pattern_or_route_id_or_route

A pattern, a route identifier or a ICanBoogie\Routing\Route instance.

$params

Returns

string
public
# generate_url( $pattern_or_route_id_or_route, $params = null )

Properties summary

public static boolean $is_running

Whether the core is running or not.

Whether the core is running or not.

# false

Magic properties

public Config $configs

Configurations manager.

public ICanBoogie\Storage\FileStorage $vars

Persistent variables registry.

public ICanBoogie\Session $session

User's session.

public string $language

Locale language.

public string|integer $timezone

Time zone.

public array $config

The "core" configuration.

public ICanBoogie\HTTP\Request $initial_request

The initial request.

public Routing\Routes $routes

The following properties are provider by icanboogie/module:

public Module\ModelCollection $models
public Module\ModuleCollection $modules

The following properties are provider by icanboogie/bind-activerecord:

public ActiveRecord\ConnectionCollection $connections
public ActiveRecord\Connection $db

The following properties are provider by icanboogie/bind-render:

public Render\TemplateResolverInterface $template_resolver
public Render\EngineCollection $template_engines
public Render\Renderer $renderer

The following properties are provider by icanboogie/bind-cldr:

public read-only boolean $is_booting

true if the core is booting, false otherwise.

public read-only boolean $is_booted

true if the core is booted, false otherwise.

public read-only ICanBoogie\HTTP\Request $request

The request being processed.

public read-only Events $events

Event collection.

public read-only ICanBoogie\LoggerInterface $logger

The message logger. The following properties are provider by icanboogie/routing:

public read-only CLDR\Locale $locale
public read-only CLDR\Repository $cldr
ICanBoogie/ICanBoogie v2.3.1 API documentation generated by ApiGen