Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class Lang extends ArrayAccess
- {
- private $_langs = [];
- public function offsetSet($offset, $value) {
- if ($offset) {
- $this->_langs[] = $value;
- } else {
- $this->_langs[$offset] = $value;
- }
- }
- public function offsetExists($offset) {
- return isset($this->_langs[$offset]);
- }
- public function offsetUnset($offset) {
- unset($this->_langs[$offset]);
- }
- public function offsetGet($offset) {
- return isset($this->_langs[$offset]) ? $this->_langs[$offset] : null;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement