public function addOrder($param, $mode = 'asc', array $options = null)
    {
        if (is_string($param) && $mode !== null) {
            $expr = $this->createOrder();
            $expr->setProperty($param);
            $expr->setMode($mode);
        } else {
            $expr = $param;
        }

        $expr = $this->processOrder($expr);

        /** @deprecated 0.3 */
        if (is_array($param) && isset($param['options'])) {
            $expr->setData($param['options']);
        }

        if (is_array($options)) {
            $expr->setData($options);
        }

        $this->orders[] = $this->parseOrderWithModel($expr);
        return $this;
    }