Exemplo n.º 1
0
 /**
  * Read the given select clause and apply selection to the 
  * 'Projection Tree', mark the entire tree as selected if this
  * clause is null
  * Note: _parseExpand should to be called before the invocation 
  * of this function so that basic 'Projection Tree' with expand 
  * information will be ready.
  * 
  * @param string $select Value of $select clause.
  *
  * 
  * @throws ODataException If any error occurs while reading expand clause
  *                        or applying selection to projection tree
  */
 private function _parseSelect($select)
 {
     if (is_null($select)) {
         $this->_rootProjectionNode->markSubtreeAsSelected();
     } else {
         $pathSegments = $this->_readExpandOrSelect($select, true);
         $this->_applySelectionToProjectionTree($pathSegments);
         $this->_rootProjectionNode->setSelectionSpecified();
         $this->_rootProjectionNode->removeNonSelectedNodes();
         $this->_rootProjectionNode->removeNodesAlreadyIncludedImplicitly();
         //TODO: Move sort to parseExpandAndSelectClause function
         $this->_rootProjectionNode->sortNodes();
     }
 }