[ Index ] |
PHP Cross Reference of phpBB-3.1.12-deutsch |
[Summary view] [Print] [Text view]
1 <?php 2 /** 3 * 4 * This file is part of the phpBB Forum Software package. 5 * 6 * @copyright (c) phpBB Limited <https://www.phpbb.com> 7 * @license GNU General Public License, version 2 (GPL-2.0) 8 * 9 * For full copyright and license information, please see 10 * the docs/CREDITS.txt file. 11 * 12 */ 13 14 namespace phpbb\event; 15 16 use Symfony\Component\EventDispatcher\Event; 17 18 class data extends Event implements \ArrayAccess 19 { 20 private $data; 21 22 public function __construct(array $data = array()) 23 { 24 $this->set_data($data); 25 } 26 27 public function set_data(array $data = array()) 28 { 29 $this->data = $data; 30 } 31 32 public function get_data() 33 { 34 return $this->data; 35 } 36 37 /** 38 * Returns data filtered to only include specified keys. 39 * 40 * This effectively discards any keys added to data by hooks. 41 */ 42 public function get_data_filtered($keys) 43 { 44 return array_intersect_key($this->data, array_flip($keys)); 45 } 46 47 public function offsetExists($offset) 48 { 49 return isset($this->data[$offset]); 50 } 51 52 public function offsetGet($offset) 53 { 54 return isset($this->data[$offset]) ? $this->data[$offset] : null; 55 } 56 57 public function offsetSet($offset, $value) 58 { 59 $this->data[$offset] = $value; 60 } 61 62 public function offsetUnset($offset) 63 { 64 unset($this->data[$offset]); 65 } 66 }
title
Description
Body
title
Description
Body
title
Description
Body
title
Body
Generated: Thu Jan 11 00:25:41 2018 | Cross-referenced by PHPXref 0.7.1 |