1<?php 2 3class CSSCounterCollection { 4 var $_counters; 5 6 function CSSCounterCollection() { 7 $this->_counters = array(); 8 } 9 10 function add(&$counter) { 11 $this->_counters[$counter->get_name()] =& $counter; 12 } 13 14 function &get($name) { 15 if (!isset($this->_counters[$name])) { 16 $null = null; 17 return $null; 18 }; 19 20 return $this->_counters[$name]; 21 } 22} 23 24?>