2011-10-29 03:04:17 +02:00
|
|
|
<?php
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Creates a map from an SS_List by defining a key column and a value column.
|
2014-08-15 08:53:05 +02:00
|
|
|
*
|
2012-04-12 08:02:46 +02:00
|
|
|
* @package framework
|
2011-10-29 03:04:17 +02:00
|
|
|
* @subpackage model
|
|
|
|
*/
|
|
|
|
class SS_Map implements ArrayAccess, Countable, IteratorAggregate {
|
2013-11-16 01:05:30 +01:00
|
|
|
|
2011-10-29 03:04:17 +02:00
|
|
|
protected $list, $keyField, $valueField;
|
2014-08-15 08:53:05 +02:00
|
|
|
|
2013-11-16 01:05:30 +01:00
|
|
|
/**
|
|
|
|
* @see SS_Map::unshift()
|
|
|
|
*
|
2014-08-15 08:53:05 +02:00
|
|
|
* @var array $firstItems
|
2013-11-16 01:05:30 +01:00
|
|
|
*/
|
2011-10-29 03:04:17 +02:00
|
|
|
protected $firstItems = array();
|
|
|
|
|
2013-11-16 01:05:30 +01:00
|
|
|
/**
|
|
|
|
* @see SS_Map::push()
|
|
|
|
*
|
|
|
|
* @var array $lastItems
|
|
|
|
*/
|
|
|
|
protected $lastItems = array();
|
|
|
|
|
2011-10-29 03:04:17 +02:00
|
|
|
/**
|
|
|
|
* Construct a new map around an SS_list.
|
2013-11-16 01:05:30 +01:00
|
|
|
*
|
2011-10-29 03:04:17 +02:00
|
|
|
* @param $list The list to build a map from
|
|
|
|
* @param $keyField The field to use as the key of each map entry
|
|
|
|
* @param $valueField The field to use as the value of each map entry
|
|
|
|
*/
|
2012-09-19 12:07:39 +02:00
|
|
|
public function __construct(SS_List $list, $keyField = "ID", $valueField = "Title") {
|
2011-10-29 03:04:17 +02:00
|
|
|
$this->list = $list;
|
|
|
|
$this->keyField = $keyField;
|
|
|
|
$this->valueField = $valueField;
|
|
|
|
}
|
2014-08-15 08:53:05 +02:00
|
|
|
|
2011-10-29 03:04:17 +02:00
|
|
|
/**
|
2013-11-16 01:05:30 +01:00
|
|
|
* Set the key field for this map.
|
|
|
|
*
|
|
|
|
* @var string $keyField
|
2011-10-29 03:04:17 +02:00
|
|
|
*/
|
2012-09-19 12:07:39 +02:00
|
|
|
public function setKeyField($keyField) {
|
2011-10-29 03:04:17 +02:00
|
|
|
$this->keyField = $keyField;
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
2013-11-16 01:05:30 +01:00
|
|
|
* Set the value field for this map.
|
|
|
|
*
|
|
|
|
* @var string $valueField
|
2011-10-29 03:04:17 +02:00
|
|
|
*/
|
2012-09-19 12:07:39 +02:00
|
|
|
public function setValueField($valueField) {
|
2011-10-29 03:04:17 +02:00
|
|
|
$this->valueField = $valueField;
|
|
|
|
}
|
2014-08-15 08:53:05 +02:00
|
|
|
|
2011-10-29 03:04:17 +02:00
|
|
|
/**
|
2013-11-16 01:05:30 +01:00
|
|
|
* Return an array equivalent to this map.
|
|
|
|
*
|
|
|
|
* @return array
|
2011-10-29 03:04:17 +02:00
|
|
|
*/
|
2012-09-19 12:07:39 +02:00
|
|
|
public function toArray() {
|
2011-10-29 03:04:17 +02:00
|
|
|
$array = array();
|
2013-11-16 01:05:30 +01:00
|
|
|
|
2011-10-29 03:04:17 +02:00
|
|
|
foreach($this as $k => $v) {
|
|
|
|
$array[$k] = $v;
|
|
|
|
}
|
2013-11-16 01:05:30 +01:00
|
|
|
|
2011-10-29 03:04:17 +02:00
|
|
|
return $array;
|
|
|
|
}
|
2012-02-10 23:44:04 +01:00
|
|
|
|
2011-10-29 03:04:17 +02:00
|
|
|
/**
|
2013-11-16 01:05:30 +01:00
|
|
|
* Return all the keys of this map.
|
|
|
|
*
|
|
|
|
* @return array
|
2011-10-29 03:04:17 +02:00
|
|
|
*/
|
2012-09-19 12:07:39 +02:00
|
|
|
public function keys() {
|
2013-11-16 01:05:30 +01:00
|
|
|
return array_keys($this->toArray());
|
2011-10-29 03:04:17 +02:00
|
|
|
}
|
2012-02-10 23:44:04 +01:00
|
|
|
|
2011-10-29 03:04:17 +02:00
|
|
|
/**
|
2013-11-16 01:05:30 +01:00
|
|
|
* Return all the values of this map.
|
|
|
|
*
|
|
|
|
* @return array
|
2011-10-29 03:04:17 +02:00
|
|
|
*/
|
2012-09-19 12:07:39 +02:00
|
|
|
public function values() {
|
2013-11-16 01:05:30 +01:00
|
|
|
return array_values($this->toArray());
|
2011-10-29 03:04:17 +02:00
|
|
|
}
|
2012-02-10 23:44:04 +01:00
|
|
|
|
2011-10-29 03:04:17 +02:00
|
|
|
/**
|
2013-11-16 01:05:30 +01:00
|
|
|
* Unshift an item onto the start of the map.
|
|
|
|
*
|
|
|
|
* Stores the value in addition to the {@link DataQuery} for the map.
|
|
|
|
*
|
|
|
|
* @var string $key
|
|
|
|
* @var mixed $value
|
2011-10-29 03:04:17 +02:00
|
|
|
*/
|
2012-09-19 12:07:39 +02:00
|
|
|
public function unshift($key, $value) {
|
2011-10-29 03:04:17 +02:00
|
|
|
$oldItems = $this->firstItems;
|
2013-11-16 01:05:30 +01:00
|
|
|
$this->firstItems = array(
|
|
|
|
$key => $value
|
|
|
|
);
|
|
|
|
|
|
|
|
if($oldItems) {
|
|
|
|
$this->firstItems = $this->firstItems + $oldItems;
|
|
|
|
}
|
2014-08-15 08:53:05 +02:00
|
|
|
|
2013-11-16 01:05:30 +01:00
|
|
|
return $this;
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Pushes an item onto the end of the map.
|
|
|
|
*
|
|
|
|
* @var string $key
|
|
|
|
* @var mixed $value
|
|
|
|
*/
|
|
|
|
public function push($key, $value) {
|
|
|
|
$oldItems = $this->lastItems;
|
|
|
|
|
|
|
|
$this->lastItems = array(
|
|
|
|
$key => $value
|
|
|
|
);
|
|
|
|
|
|
|
|
if($oldItems) {
|
|
|
|
$this->lastItems = $this->lastItems + $oldItems;
|
|
|
|
}
|
2014-08-15 08:53:05 +02:00
|
|
|
|
2012-11-30 02:37:36 +01:00
|
|
|
return $this;
|
2011-10-29 03:04:17 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
// ArrayAccess
|
2014-08-15 08:53:05 +02:00
|
|
|
|
2013-11-16 01:05:30 +01:00
|
|
|
/**
|
|
|
|
* @var string $key
|
|
|
|
*
|
|
|
|
* @return boolean
|
|
|
|
*/
|
2012-09-19 12:07:39 +02:00
|
|
|
public function offsetExists($key) {
|
2013-11-16 01:05:30 +01:00
|
|
|
if(isset($this->firstItems[$key])) {
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
|
|
|
|
if(isset($this->lastItems[$key])) {
|
|
|
|
return true;
|
|
|
|
}
|
2014-08-15 08:53:05 +02:00
|
|
|
|
2011-10-29 03:04:17 +02:00
|
|
|
$record = $this->list->find($this->keyField, $key);
|
2013-11-16 01:05:30 +01:00
|
|
|
|
2011-10-29 03:04:17 +02:00
|
|
|
return $record != null;
|
|
|
|
}
|
2013-11-16 01:05:30 +01:00
|
|
|
|
|
|
|
/**
|
|
|
|
* @var string $key
|
|
|
|
*
|
|
|
|
* @return mixed
|
|
|
|
*/
|
2012-09-19 12:07:39 +02:00
|
|
|
public function offsetGet($key) {
|
2013-11-16 01:05:30 +01:00
|
|
|
if(isset($this->firstItems[$key])) {
|
|
|
|
return $this->firstItems[$key];
|
|
|
|
}
|
|
|
|
|
|
|
|
if(isset($this->lastItems[$key])) {
|
|
|
|
return $this->lastItems[$key];
|
|
|
|
}
|
2011-10-29 03:04:17 +02:00
|
|
|
|
|
|
|
$record = $this->list->find($this->keyField, $key);
|
2013-11-16 01:05:30 +01:00
|
|
|
|
2011-10-29 03:04:17 +02:00
|
|
|
if($record) {
|
|
|
|
$col = $this->valueField;
|
2013-11-16 01:05:30 +01:00
|
|
|
|
2011-10-29 03:04:17 +02:00
|
|
|
return $record->$col;
|
|
|
|
}
|
2013-11-16 01:05:30 +01:00
|
|
|
|
|
|
|
return null;
|
2011-10-29 03:04:17 +02:00
|
|
|
}
|
2013-11-16 01:05:30 +01:00
|
|
|
|
|
|
|
/**
|
2014-08-15 08:53:05 +02:00
|
|
|
* Sets a value in the map by a given key that has been set via
|
2013-11-16 01:05:30 +01:00
|
|
|
* {@link SS_Map::push()} or {@link SS_Map::unshift()}
|
|
|
|
*
|
2014-08-15 08:53:05 +02:00
|
|
|
* Keys in the map cannot be set since these values are derived from a
|
2013-11-16 01:05:30 +01:00
|
|
|
* {@link DataQuery} instance. In this case, use {@link SS_Map::toArray()}
|
|
|
|
* and manipulate the resulting array.
|
|
|
|
*
|
|
|
|
* @var string $key
|
|
|
|
* @var mixed $value
|
|
|
|
*/
|
2012-09-19 12:07:39 +02:00
|
|
|
public function offsetSet($key, $value) {
|
2013-11-16 01:05:30 +01:00
|
|
|
if(isset($this->firstItems[$key])) {
|
|
|
|
return $this->firstItems[$key] = $value;
|
|
|
|
}
|
|
|
|
|
|
|
|
if(isset($this->lastItems[$key])) {
|
|
|
|
return $this->lastItems[$key] = $value;
|
|
|
|
}
|
2011-10-29 03:04:17 +02:00
|
|
|
|
2013-11-16 01:05:30 +01:00
|
|
|
user_error(
|
2016-10-27 17:14:01 +02:00
|
|
|
'SS_Map is read-only. Please use $map->push($key, $value) to append values',
|
2013-11-16 01:05:30 +01:00
|
|
|
E_USER_ERROR
|
|
|
|
);
|
2011-10-29 03:04:17 +02:00
|
|
|
}
|
2013-11-16 01:05:30 +01:00
|
|
|
|
|
|
|
/**
|
2014-08-15 08:53:05 +02:00
|
|
|
* Removes a value in the map by a given key which has been added to the map
|
2013-11-16 01:05:30 +01:00
|
|
|
* via {@link SS_Map::push()} or {@link SS_Map::unshift()}
|
|
|
|
*
|
2014-08-15 08:53:05 +02:00
|
|
|
* Keys in the map cannot be unset since these values are derived from a
|
2013-11-16 01:05:30 +01:00
|
|
|
* {@link DataQuery} instance. In this case, use {@link SS_Map::toArray()}
|
|
|
|
* and manipulate the resulting array.
|
|
|
|
*
|
|
|
|
* @var string $key
|
|
|
|
* @var mixed $value
|
|
|
|
*/
|
2012-09-19 12:07:39 +02:00
|
|
|
public function offsetUnset($key) {
|
2011-10-29 03:04:17 +02:00
|
|
|
if(isset($this->firstItems[$key])) {
|
|
|
|
unset($this->firstItems[$key]);
|
2013-11-16 01:05:30 +01:00
|
|
|
|
2011-10-29 03:04:17 +02:00
|
|
|
return;
|
|
|
|
}
|
2014-08-15 08:53:05 +02:00
|
|
|
|
2013-11-16 01:05:30 +01:00
|
|
|
if(isset($this->lastItems[$key])) {
|
|
|
|
unset($this->lastItems[$key]);
|
2014-08-15 08:53:05 +02:00
|
|
|
|
2013-11-16 01:05:30 +01:00
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
user_error(
|
2014-08-15 08:53:05 +02:00
|
|
|
"SS_Map is read-only. Unset cannot be called on keys derived from the DataQuery",
|
2013-11-16 01:05:30 +01:00
|
|
|
E_USER_ERROR
|
|
|
|
);
|
2011-10-29 03:04:17 +02:00
|
|
|
}
|
2014-08-15 08:53:05 +02:00
|
|
|
|
2013-11-16 01:05:30 +01:00
|
|
|
/**
|
|
|
|
* Returns an SS_Map_Iterator instance for iterating over the complete set
|
|
|
|
* of items in the map.
|
|
|
|
*
|
|
|
|
* Satisfies the IteratorAggreagte interface.
|
|
|
|
*
|
|
|
|
* @return SS_Map_Iterator
|
|
|
|
*/
|
2012-09-19 12:07:39 +02:00
|
|
|
public function getIterator() {
|
2013-11-16 01:05:30 +01:00
|
|
|
return new SS_Map_Iterator(
|
2014-08-15 08:53:05 +02:00
|
|
|
$this->list->getIterator(),
|
|
|
|
$this->keyField,
|
|
|
|
$this->valueField,
|
2013-11-16 01:05:30 +01:00
|
|
|
$this->firstItems,
|
|
|
|
$this->lastItems
|
|
|
|
);
|
2011-10-29 03:04:17 +02:00
|
|
|
}
|
|
|
|
|
2013-11-16 01:05:30 +01:00
|
|
|
/**
|
|
|
|
* Returns the count of items in the list including the additional items set
|
|
|
|
* through {@link SS_Map::push()} and {@link SS_Map::unshift}.
|
|
|
|
*
|
|
|
|
* @return int
|
|
|
|
*/
|
2012-09-19 12:07:39 +02:00
|
|
|
public function count() {
|
2014-08-15 08:53:05 +02:00
|
|
|
return $this->list->count() +
|
|
|
|
count($this->firstItems) +
|
2013-11-16 01:05:30 +01:00
|
|
|
count($this->lastItems);
|
2011-10-29 03:04:17 +02:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Builds a map iterator around an Iterator. Called by SS_Map
|
2013-11-16 01:05:30 +01:00
|
|
|
*
|
2012-04-12 08:02:46 +02:00
|
|
|
* @package framework
|
2011-10-29 03:04:17 +02:00
|
|
|
* @subpackage model
|
|
|
|
*/
|
|
|
|
class SS_Map_Iterator implements Iterator {
|
2013-11-16 01:05:30 +01:00
|
|
|
|
2011-10-29 03:04:17 +02:00
|
|
|
protected $items;
|
|
|
|
protected $keyField, $titleField;
|
2014-08-15 08:53:05 +02:00
|
|
|
|
2011-10-29 03:04:17 +02:00
|
|
|
protected $firstItemIdx = 0;
|
2013-11-16 01:05:30 +01:00
|
|
|
|
|
|
|
protected $endItemIdx;
|
|
|
|
|
2011-10-29 03:04:17 +02:00
|
|
|
protected $firstItems = array();
|
2013-11-16 01:05:30 +01:00
|
|
|
protected $lastItems = array();
|
|
|
|
|
2011-10-29 03:04:17 +02:00
|
|
|
protected $excludedItems = array();
|
2014-08-15 08:53:05 +02:00
|
|
|
|
2011-10-29 03:04:17 +02:00
|
|
|
/**
|
2013-11-16 01:05:30 +01:00
|
|
|
* @param Iterator $items The iterator to build this map from
|
|
|
|
* @param string $keyField The field to use for the keys
|
|
|
|
* @param string $titleField The field to use for the values
|
|
|
|
* @param array $fristItems An optional map of items to show first
|
|
|
|
* @param array $lastItems An optional map of items to show last
|
2011-10-29 03:04:17 +02:00
|
|
|
*/
|
2013-11-16 01:05:30 +01:00
|
|
|
public function __construct(Iterator $items, $keyField, $titleField, $firstItems = null, $lastItems = null) {
|
2011-10-29 03:04:17 +02:00
|
|
|
$this->items = $items;
|
|
|
|
$this->keyField = $keyField;
|
|
|
|
$this->titleField = $titleField;
|
2013-11-16 01:05:30 +01:00
|
|
|
$this->endItemIdx = null;
|
|
|
|
|
|
|
|
if($firstItems) {
|
|
|
|
foreach($firstItems as $k => $v) {
|
|
|
|
$this->firstItems[] = array($k,$v);
|
|
|
|
$this->excludedItems[] = $k;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
if($lastItems) {
|
|
|
|
foreach($lastItems as $k => $v) {
|
|
|
|
$this->lastItems[] = array($k, $v);
|
|
|
|
$this->excludedItems[] = $k;
|
|
|
|
}
|
2011-10-29 03:04:17 +02:00
|
|
|
}
|
2014-08-15 08:53:05 +02:00
|
|
|
|
2011-10-29 03:04:17 +02:00
|
|
|
}
|
2014-08-15 08:53:05 +02:00
|
|
|
|
2013-11-16 01:05:30 +01:00
|
|
|
/**
|
|
|
|
* Rewind the Iterator to the first element.
|
|
|
|
*
|
|
|
|
* @return mixed
|
|
|
|
*/
|
2011-10-29 03:04:17 +02:00
|
|
|
public function rewind() {
|
|
|
|
$this->firstItemIdx = 0;
|
2013-11-16 01:05:30 +01:00
|
|
|
$this->endItemIdx = null;
|
|
|
|
|
2011-10-29 03:04:17 +02:00
|
|
|
$rewoundItem = $this->items->rewind();
|
|
|
|
|
|
|
|
if(isset($this->firstItems[$this->firstItemIdx])) {
|
|
|
|
return $this->firstItems[$this->firstItemIdx][1];
|
|
|
|
} else {
|
2013-11-16 01:05:30 +01:00
|
|
|
if($rewoundItem) {
|
|
|
|
if($rewoundItem->hasMethod($this->titleField)) {
|
|
|
|
return $rewoundItem->{$this->titleField}();
|
|
|
|
}
|
2014-08-15 08:53:05 +02:00
|
|
|
|
2013-11-16 01:05:30 +01:00
|
|
|
return $rewoundItem->{$this->titleField};
|
|
|
|
} else if(!$this->items->valid() && $this->lastItems) {
|
|
|
|
$this->endItemIdx = 0;
|
|
|
|
|
2014-08-15 08:53:05 +02:00
|
|
|
return $this->lastItems[0][1];
|
2013-11-16 01:05:30 +01:00
|
|
|
}
|
2011-10-29 03:04:17 +02:00
|
|
|
}
|
|
|
|
}
|
2014-08-15 08:53:05 +02:00
|
|
|
|
2013-11-16 01:05:30 +01:00
|
|
|
/**
|
|
|
|
* Return the current element.
|
|
|
|
*
|
|
|
|
* @return mixed
|
|
|
|
*/
|
2011-10-29 03:04:17 +02:00
|
|
|
public function current() {
|
2013-11-16 01:05:30 +01:00
|
|
|
if(($this->endItemIdx !== null) && isset($this->lastItems[$this->endItemIdx])) {
|
|
|
|
return $this->lastItems[$this->endItemIdx][1];
|
|
|
|
} else if(isset($this->firstItems[$this->firstItemIdx])) {
|
2011-10-29 03:04:17 +02:00
|
|
|
return $this->firstItems[$this->firstItemIdx][1];
|
|
|
|
} else {
|
2013-11-16 01:05:30 +01:00
|
|
|
if($this->items->current()->hasMethod($this->titleField)) {
|
|
|
|
return $this->items->current()->{$this->titleField}();
|
2014-08-15 08:53:05 +02:00
|
|
|
}
|
2013-11-16 01:05:30 +01:00
|
|
|
|
|
|
|
return $this->items->current()->{$this->titleField};
|
2011-10-29 03:04:17 +02:00
|
|
|
}
|
|
|
|
}
|
2014-08-15 08:53:05 +02:00
|
|
|
|
2013-11-16 01:05:30 +01:00
|
|
|
/**
|
|
|
|
* Return the key of the current element.
|
|
|
|
*
|
|
|
|
* @return string
|
|
|
|
*/
|
2011-10-29 03:04:17 +02:00
|
|
|
public function key() {
|
2013-11-16 01:05:30 +01:00
|
|
|
if(($this->endItemIdx !== null) && isset($this->lastItems[$this->endItemIdx])) {
|
|
|
|
return $this->lastItems[$this->endItemIdx][0];
|
|
|
|
} else if(isset($this->firstItems[$this->firstItemIdx])) {
|
2011-10-29 03:04:17 +02:00
|
|
|
return $this->firstItems[$this->firstItemIdx][0];
|
|
|
|
} else {
|
|
|
|
return $this->items->current()->{$this->keyField};
|
|
|
|
}
|
|
|
|
}
|
2014-08-15 08:53:05 +02:00
|
|
|
|
2013-11-16 01:05:30 +01:00
|
|
|
/**
|
|
|
|
* Move forward to next element.
|
|
|
|
*
|
|
|
|
* @return mixed
|
|
|
|
*/
|
2011-10-29 03:04:17 +02:00
|
|
|
public function next() {
|
|
|
|
$this->firstItemIdx++;
|
2013-11-16 01:05:30 +01:00
|
|
|
|
2011-10-29 03:04:17 +02:00
|
|
|
if(isset($this->firstItems[$this->firstItemIdx])) {
|
|
|
|
return $this->firstItems[$this->firstItemIdx][1];
|
|
|
|
} else {
|
2013-11-16 01:05:30 +01:00
|
|
|
if(!isset($this->firstItems[$this->firstItemIdx-1])) {
|
|
|
|
$this->items->next();
|
|
|
|
}
|
2011-10-29 03:04:17 +02:00
|
|
|
|
2012-09-26 23:34:00 +02:00
|
|
|
if($this->excludedItems) {
|
|
|
|
while(($c = $this->items->current()) && in_array($c->{$this->keyField}, $this->excludedItems, true)) {
|
|
|
|
$this->items->next();
|
|
|
|
}
|
2011-10-29 03:04:17 +02:00
|
|
|
}
|
|
|
|
}
|
2013-11-16 01:05:30 +01:00
|
|
|
|
|
|
|
if(!$this->items->valid()) {
|
|
|
|
// iterator has passed the preface items, off the end of the items
|
|
|
|
// list. Track through the end items to go through to the next
|
|
|
|
if($this->endItemIdx === null) {
|
|
|
|
$this->endItemIdx = -1;
|
|
|
|
}
|
2014-08-15 08:53:05 +02:00
|
|
|
|
2013-11-16 01:05:30 +01:00
|
|
|
$this->endItemIdx++;
|
|
|
|
|
|
|
|
if(isset($this->lastItems[$this->endItemIdx])) {
|
|
|
|
return $this->lastItems[$this->endItemIdx];
|
|
|
|
}
|
|
|
|
|
|
|
|
return false;
|
|
|
|
}
|
2011-10-29 03:04:17 +02:00
|
|
|
}
|
2014-08-15 08:53:05 +02:00
|
|
|
|
2013-11-16 01:05:30 +01:00
|
|
|
/**
|
|
|
|
* Checks if current position is valid.
|
|
|
|
*
|
|
|
|
* @return boolean
|
|
|
|
*/
|
2011-10-29 03:04:17 +02:00
|
|
|
public function valid() {
|
2013-11-16 01:05:30 +01:00
|
|
|
return (
|
|
|
|
(isset($this->firstItems[$this->firstItemIdx])) ||
|
|
|
|
(($this->endItemIdx !== null) && isset($this->lastItems[$this->endItemIdx])) ||
|
|
|
|
$this->items->valid()
|
|
|
|
);
|
2011-10-29 03:04:17 +02:00
|
|
|
}
|
|
|
|
}
|