|
TYPO3 API
SVNRelease
|
00001 <?php 00002 /*************************************************************** 00003 * Copyright notice 00004 * 00005 * All rights reserved 00006 * 00007 * This class is a backport of the corresponding class of FLOW3. 00008 * All credits go to the v5 team. 00009 * 00010 * This script is part of the TYPO3 project. The TYPO3 project is 00011 * free software; you can redistribute it and/or modify 00012 * it under the terms of the GNU General Public License as published by 00013 * the Free Software Foundation; either version 2 of the License, or 00014 * (at your option) any later version. 00015 * 00016 * The GNU General Public License can be found at 00017 * http://www.gnu.org/copyleft/gpl.html. 00018 * 00019 * This script is distributed in the hope that it will be useful, 00020 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00021 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00022 * GNU General Public License for more details. 00023 * 00024 * This copyright notice MUST APPEAR in all copies of the script! 00025 ***************************************************************/ 00026 00027 /** 00028 * ArrayAccess class for the Reflection tests 00029 * 00030 * @license http://www.gnu.org/licenses/lgpl.html GNU Lesser General Public License, version 3 or later 00031 */ 00032 class Tx_Extbase_Tests_Unit_Reflection_Fixture_ArrayAccessClass implements ArrayAccess { 00033 00034 protected $array = array(); 00035 00036 public function __construct(array $array) { 00037 $this->array = $array; 00038 } 00039 00040 public function offsetExists($offset) { 00041 return array_key_exists($offset, $this->array); 00042 } 00043 00044 public function offsetGet($offset) { 00045 return $this->array[$offset]; 00046 } 00047 00048 public function offsetSet($offset, $value) { 00049 $this->array[$offset] = $value; 00050 } 00051 00052 public function offsetUnset($offset) { 00053 unset($this->array[$offset]); 00054 } 00055 00056 } 00057 ?>
1.8.0