/
Params.php
68 lines (50 loc) · 1.69 KB
/
Params.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
<?php
/**
* This is a container class for Stamp album professional.
* the parameters are read from a .ini file and the file MUST contain
* a [params] section for the default getters and setters to work
*
*
*
* @package Stamp Album Pro
* @subpackage Album
* @class Params
* @version 1.0
* @author Dexter Oddwick <dexter@oddwick.com>
* @copyright Copyright (c)2017
* @license http://www.oddwick.com
*
* @todo make easier
* @requires ~/config/defaults.ini
* @requires ~/config/options.ini
*
*/
class Params extends Nerb_Params {
/**
* Constructor initiates Param object
*
* @access public
* @param mixed $ini
* @param array $params (default: array())
* @throws Nerb_Error
* @return Params
*/
public function __construct( $ini, $params = array() ){
# force the default construction
parent::__construct( $ini, $params );
# format creation date and mod date as a date and add it to the array
$this->_params["info"]["CreationDate"] = $this->_params["info"]["ModDate"] = date( "F j, Y g:i a", time() );
return $this;
} // end function -----------------------------------------------------------------------------------------------------------------------------------------------
/**
* Fetches all the display parameters
*
* @access public
* @return array the return the display variables
*/
public function display(){
// returns all values
return $this->_params["display"];
} // end function -----------------------------------------------------------------------------------------------------------------------------------------------
} // end class
?>