public function setOrdersBy($value)
{
if (is_array($value) || $value instanceof Traversable) {
$this->_ordersBy->copyFrom($value);
} else {
$value = trim(preg_replace('/\\s+/', ' ', (string) $value));
$orderBys = array();
foreach (explode(',', $value) as $orderBy) {
$vs = explode(' ', trim($orderBy));
$orderBys[$vs[0]] = isset($vs[1]) ? $vs[1] : 'asc';
}
$this->_ordersBy->copyFrom($orderBys);
}
}