PHP Class mult1mate\crontab\TaskLoader

Author: mult1mate
Show file Open project: MUlt1mate/cron-manager Class Usage Examples

Protected Properties

Property Type Description
$class_folders array Contains array of directories from which TaskLoader will try to load classes

Public Methods

Method Description
getAllMethods ( string | array $folder, string | array $namespace = [] ) : array Scan folders for classes and return all their public methods
getControllerMethods ( string $class ) : array Returns all public methods for requested class
loadController ( $class_name ) : boolean Looks for and loads required class via require_once
setClassFolder ( $folder ) : array Sets folders which contain needed classes

Protected Methods

Method Description
getControllersList ( array $paths, $namespaces_list ) : array Returns names of all php files in directories

Method Details

getAllMethods() public static method

Scan folders for classes and return all their public methods
public static getAllMethods ( string | array $folder, string | array $namespace = [] ) : array
$folder string | array
$namespace string | array
return array

getControllerMethods() public static method

Returns all public methods for requested class
public static getControllerMethods ( string $class ) : array
$class string
return array

getControllersList() protected static method

Returns names of all php files in directories
protected static getControllersList ( array $paths, $namespaces_list ) : array
$paths array
$namespaces_list
return array

loadController() public static method

Looks for and loads required class via require_once
public static loadController ( $class_name ) : boolean
$class_name
return boolean

setClassFolder() public static method

Sets folders which contain needed classes
public static setClassFolder ( $folder ) : array
$folder
return array

Property Details

$class_folders protected static property

Contains array of directories from which TaskLoader will try to load classes
protected static array $class_folders
return array