public function __get($key)
{
switch ($key) {
case 'sortby':
if (!$this->_sortby && $this->mapper->defaultSort) {
// Add in any default sort values, if none are already set.
$this->sortBy($this->mapper->defaultSort);
}
return $this->_sortby;
}
throw new InvalidArgumentException('Undefined property ' . $key);
}