Example #1
0
 /**
  * Constructs new instance of OrderByInfo
  * 
  * @param array $orderByPathSegments                        Order by 
  *                                                          path segments
  * array(OrderByPathSegment)
  * @param array $navigationPropertiesUsedInTheOrderByClause navigation
  *                                                          properties used
  *                                                          in the order 
  *                                                          by clause
  * array(array(ResourceProperty))/NULL
  * 
  * @throws InvalidArgumentException
  */
 public function __construct($orderByPathSegments, $navigationPropertiesUsedInTheOrderByClause)
 {
     if (!is_array($orderByPathSegments)) {
         throw new \InvalidArgumentException(Messages::orderByInfoPathSegmentsArgumentShouldBeNonEmptyArray());
     }
     if (empty($orderByPathSegments)) {
         throw new \InvalidArgumentException(Messages::orderByInfoPathSegmentsArgumentShouldBeNonEmptyArray());
     }
     if (!is_null($navigationPropertiesUsedInTheOrderByClause)) {
         if (!is_array($navigationPropertiesUsedInTheOrderByClause)) {
             throw new \InvalidArgumentException(Messages::orderByInfoNaviUSedArgumentShouldBeNullOrNonEmptyArray());
         }
         if (empty($navigationPropertiesUsedInTheOrderByClause)) {
             throw new \InvalidArgumentException(Messages::orderByInfoNaviUSedArgumentShouldBeNullOrNonEmptyArray());
         }
     }
     $this->_orderByPathSegments = $orderByPathSegments;
     $this->_navigationPropertiesUsedInTheOrderByClause = $navigationPropertiesUsedInTheOrderByClause;
 }