1 | <?php |
||
27 | class Identifier |
||
28 | { |
||
29 | /** |
||
30 | * @var string |
||
31 | */ |
||
32 | protected static $delimiter = '_'; |
||
33 | |||
34 | /** |
||
35 | * @var array |
||
36 | */ |
||
37 | protected $args = array(); |
||
38 | |||
39 | /** |
||
40 | * Create a new Cache Identifier based on the given parameters. |
||
41 | * Integer and string but not array and objects. |
||
42 | * |
||
43 | * @throws \BadMethodCallException If no identifiers received. |
||
44 | */ |
||
45 | public function __construct() |
||
55 | |||
56 | /** |
||
57 | * Return String representation of this Cache Identifier. |
||
58 | * |
||
59 | * @return string |
||
60 | */ |
||
61 | public function __toString() |
||
65 | |||
66 | /** |
||
67 | * @return string |
||
68 | */ |
||
69 | public function generate() |
||
73 | |||
74 | /** |
||
75 | * Slags the identifier. |
||
76 | * |
||
77 | * @return string |
||
78 | */ |
||
79 | protected function slag() |
||
88 | |||
89 | /** |
||
90 | * Set the delimiter used to create a Cache Identifier. |
||
91 | * |
||
92 | * @param string $delimiter The delimiter character. |
||
93 | */ |
||
94 | public function setDelimiter($delimiter) |
||
98 | |||
99 | /** |
||
100 | * Get the delimiter used to create a Cache Identifier. |
||
101 | * |
||
102 | * @return string |
||
103 | */ |
||
104 | public function getDelimiter() |
||
108 | } |
||
109 |