src/Charcoal/Source/OrderCollectionTrait.php
public function addOrders(array $orders)
    {
        foreach ($orders as $key => $order) {
            $this->addOrder($order);

            /** Name the expression if $key is a non-numeric string. */
            if (is_string($key) && !is_numeric($key)) {
                $order = end($this->orders);
                $order->setName($key);
            }
        }

        return $this;
    }
public function addOrders(array $orders)
    {
        foreach ($orders as $key => $order) {
            $this->addOrder($order);

            /** Name the expression if $key is a non-numeric string. */
            if (is_string($key) && !is_numeric($key)) {
                $order = end($this->orders);
                $order->setName($key);
            }
        }

        return $this;
    }
public function addOrders ( array $ orders ) { foreach ( $ orders as $ key => $ order ) { $ this -> addOrder ( $ order ) ; /** Name the expression if $key is a non-numeric string. */ if ( is_string ( $ key ) && ! is_numeric ( $ key ) ) { $ order = end ( $ this -> orders ) ; $ order -> setName ( $ key ) ; } } return $ this ; }
Append one or more query orders on this object.

@uses   self::processOrder()
@param  mixed[] $orders One or more orders to add on this expression.
@return self
Append one or more query orders on this object .