CMS Made Simple API

cms_config
in package
implements ArrayAccess

FinalYes

A singleton class for interacting with the CMSMS config.php file.

This class uses the ArrayAccess interface to behave like a PHP array.

Tags
since
1.9
license

GPL

author

Robert Campbell (calguy1000@cmsmadesimple.org)

Table of Contents

Interfaces

ArrayAccess

Properties

$_cache  : mixed
ignore
$_data  : mixed
ignore
$_instance  : mixed
ignore
$_types  : mixed
ignore

Methods

get_instance()  : cms_config
Retrieve the global instance of the cms_config class This method will instantiate the object if necessary
save()  : void
A function to save the current state of the config.php file. Any existing file is backed up before overwriting.
smart_image_uploads_url()  : string
Returns either the http image uploads url or the https image uploads url depending upon the request mode.
smart_root_url()  : string
Returns either the http root url or the https root url depending upon the request mode.
smart_uploads_url()  : string
Returns either the http uploads url or the https uploads url depending upon the request mode.
__construct()  : mixed
ignore
get_upload_size()  : mixed
Retrieve the maximum file upload size (in bytes)

Properties

Methods

get_instance()

Retrieve the global instance of the cms_config class This method will instantiate the object if necessary

public static & get_instance() : cms_config
Return values
cms_config

save()

A function to save the current state of the config.php file. Any existing file is backed up before overwriting.

public save([bool $verbose = true ][, string $filename = '' ]) : void
Parameters
$verbose : bool = true

indicates whether comments should be stored in the config.php file. (Note: this parameter at its current form is not being used at all[JoMorg])

$filename : string = ''

An optional complete file specification. If not specified the standard config file location will be used.

smart_image_uploads_url()

Returns either the http image uploads url or the https image uploads url depending upon the request mode.

public smart_image_uploads_url() : string
Return values
string

smart_root_url()

Returns either the http root url or the https root url depending upon the request mode.

public smart_root_url() : string
Return values
string

smart_uploads_url()

Returns either the http uploads url or the https uploads url depending upon the request mode.

public smart_uploads_url() : string
Return values
string

get_upload_size()

Retrieve the maximum file upload size (in bytes)

private get_upload_size() : mixed

        
On this page

Search results