Functions

Function to autoload system libraries

_autoload($name) 

Parameters

$name

string

Returns routable methods for the specified controller class

controller_methods(string $controller) : array

Parameters

$controller

string

Returns

array

Array_map callback to load a folder of classes at once

do_include(string $path) : void

Parameters

$path

string

Returns the last segment of the current url

get_last_segment() : string

Returns

string

Gets an array of the segments of the current url

get_segments() : array

Returns

array

Load required classes for bootstraping

init() : void

Utility function to check if a variable is set, and is an array or object

is_like_array(mixed $var) : bool

Parameters

$var

mixed

Returns

bool

Custom error handler

on_error(int $severity, string $message, string $filepath, int $line) : \miniMVC\ErrorException

Parameters

$severity

int

$message

string

$filepath

string

$line

int

Returns

\miniMVC\ErrorException

Custom exception handlererror_get_last

on_exception(\miniMVC\Exception $exception) : void

Parameters

$exception

\miniMVC\Exception

Calls the appropriate module/controller/function based on the url

route() : void

Instantiate the appropriate controller

run($module, $controller, $func, $args) 

Parameters

$module

string

$controller

string

$func

string

$args

array

General 404 function

show_404() : void

Fatal Error page function

show_error(string $message, int $status_code) 

Parameters

$message

string

$status_code

int

Function to run on script shutdown -used to catch most fatal errors, and display them cleanly

shutdown() : void

Returns a full url from a url segment

site_url(string $segment) : string

Parameters

$segment

string

Returns

string

Prints out the contents of the object

to_string(\miniMVC\object/array $data, string $method) : string

Parameters

$data

\miniMVC\object/array

$method

string

Returns

string

Classes and interfaces

Data_Store

Class for using JSON as a key->value data store

« More »

Session

Class to improve handling of PHP sessions

« More »

Classes and interfaces

Controller

Base Controller Class

« More »

DB

Extend PHP's PDO class to add some more functionality

« More »

Model

Base Model Class

« More »

Page

Class for building pages

« More »

Classes and interfaces

Bcrypt

Class to simplify dealing with bcrypt for password handling

« More »