1<?php 2// (c) Copyright by authors of the Tiki Wiki CMS Groupware Project 3// 4// All Rights Reserved. See copyright.txt for details and a complete list of authors. 5// Licensed under the GNU LESSER GENERAL PUBLIC LICENSE. See license.txt for details. 6// $Id$ 7 8class WikiParser_PluginDefinition implements ArrayAccess, Countable 9{ 10 private $repository; 11 private $data; 12 13 function __construct($repository, $data) 14 { 15 $this->repository = $repository; 16 $this->data = $data; 17 } 18 19 function offsetExists($offset) 20 { 21 return isset($this->data[$offset]); 22 } 23 24 function offsetGet($offset) 25 { 26 return $this->data[$offset]; 27 } 28 29 function offsetSet($offset, $value) 30 { 31 // Immutable 32 return $this->offsetGet($offset); 33 } 34 35 function offsetUnset($offset) 36 { 37 // Immutable 38 } 39 40 function count() 41 { 42 return count($this->data); 43 } 44} 45