RegionalInfo
class RegionalInfo
Class RegionalInfo
Traits
Properties
static protected bool | $singletonArray | Set to true if you want use more that one singleton using and index param in getInstance | from Singleton |
static protected string | $basePath | The base path where config files are placed. | from Singleton |
static private string | $className | Name of the class | from Singleton |
static private array | $instances | Hold the classes on instance. | from Singleton |
protected bool | $separateConfigFile | Set to true if you want to save configuration in a separate file | from Singleton |
protected array | $configContent | Contains the config content. |
Methods
Return this instance.
Save config to file.
Return default values
Initialization, equivalent to __construct and must be called from main class.
Container constructor.
Returns the config content.
Returns a list of date formats
Fill list with key => value, where key is style and value a sample.
Return formatted string.
Returns a list of time formats
Details
at line 61
static
RegionalInfo
getInstance()
Return this instance.
in
Singleton
at line 88
static private string
getClassName()
Returns the class name.
in
Singleton
at line 103
bool
setConfig(array $params, bool $merge = true, string $index = 'main')
Save config to file.
in
Singleton
at line 130
private array
getYamlContent()
Returns the content of the Yaml file.
in
Singleton
at line 152
string
getFilePath()
Return the full file config path.
in
Singleton
at line 162
string
getFileName()
Return the file name.
in
Singleton
at line 172
static string
yamlName()
Return the classname for yaml file.
in
Singleton
at line 184
protected bool
fileExists(string $filename)
Returns if file exists.
in
Singleton
at line 196
array
getConfig(string $index = 'main')
Returns the yaml config params.
at line 71
static array
getDefaultValues()
Return default values
in
Singleton
at line 215
string
getBasePath()
Return the base path.
in
Singleton
at line 223
protected
initSingleton()
Initialization, equivalent to __construct and must be called from main class.
at line 32
__construct()
Container constructor.
at line 48
array
getConfigContent()
Returns the config content.
If config content is empty, load from file. Otherwise return data from property.
at line 84
getDateFormats()
Returns a list of date formats
at line 110
private array
fillList(array $styles)
Fill list with key => value, where key is style and value a sample.
at line 127
private false|string
getFormatted(string $style, string $time = '2011-01-07 09:08:07')
Return formatted string.
at line 135
getTimeFormats()
Returns a list of time formats