BaseController
        
        extends BaseController
    
    
            
            in package
            
        
    
    
    
Extended base controller from the framework.
Tags
Table of Contents
Properties
- $Input : Input
 - $Languages : Languages
 - $runnedCronResult : array<string|int, mixed>
 
Methods
- __construct() : mixed
 - {@inheritDoc}
 - getPageHtmlClasses() : string
 - Get page HTML classes.
 - getPageHtmlTitle() : string
 - Get page HTML title including site name if it was set.
 - maybeRunCron() : mixed
 - Maybe run cron job if config is set to not use server cron.
 - responseJson() : string
 - {@inheritDoc}
 - responseXml() : string
 - {@inheritDoc}
 - setBasicConfig() : mixed
 - Setup basic PHP configurations such as default timezone.
 - setHeaderAllowOrigin() : mixed
 - Set header allow origin for CORS.
 - isModuleExcute() : bool
 - Check if current call is `Modules->execute()`
 
Properties
$Input
    protected
        Input
    $Input
    
    
    
    
    
$Languages
    protected
        Languages
    $Languages
    
    
    
    
    
$runnedCronResult
    protected
        array<string|int, mixed>
    $runnedCronResult
     = []
    
        Runned cron jobs result.
This is for use in case that set cron job, cron tab to run by URL.
The CronController will be call to this BaseController.
So, it is no need to using Libraries\Cron class to run jobs again.
Just get the run result from this property.
This property will be set by maybeRunCron() method.
Methods
__construct()
{@inheritDoc}
    public
                    __construct(Container $Container) : mixed
    Parameters
- $Container : Container
 
getPageHtmlClasses()
Get page HTML classes.
    protected
                    getPageHtmlClasses([array<string|int, mixed> $classes = [] ]) : string
    Parameters
- $classes : array<string|int, mixed> = []
 - 
                    
The classes to set for this html page.
 
Tags
Return values
string —Return generated html classes names.
getPageHtmlTitle()
Get page HTML title including site name if it was set.
    protected
                    getPageHtmlTitle(string $title[, string|null|false $siteName = false ]) : string
    Parameters
- $title : string
 - 
                    
The site title.
 - $siteName : string|null|false = false
 - 
                    
Site name should be string.
Set to empty string ornullwill not include the site name.
Set tofalseto automatic get the site name from config DB. 
Tags
Return values
stringmaybeRunCron()
Maybe run cron job if config is set to not use server cron.
    protected
                    maybeRunCron() : mixed
    responseJson()
{@inheritDoc}
    protected
                    responseJson(mixed $output) : string
    Parameters
- $output : mixed
 
Return values
stringresponseXml()
{@inheritDoc}
    protected
                    responseXml(mixed $output) : string
    Parameters
- $output : mixed
 
Return values
stringsetBasicConfig()
Setup basic PHP configurations such as default timezone.
    protected
                    setBasicConfig() : mixed
    setHeaderAllowOrigin()
Set header allow origin for CORS.
    protected
                    setHeaderAllowOrigin() : mixed
    isModuleExcute()
Check if current call is `Modules->execute()`
    private
                    isModuleExcute() : bool
    This method was called from maybeRunCron(), __construct().
Tags
Return values
bool —Return true if it is, false if it is not.