コード例 #1
0
ファイル: Leaf.php プロジェクト: BenjaminBeck/commerce
 /**
  * Returns the sorted array
  * Merges with the sorted arrays of the leafs.
  *
  * @return array
  */
 public function getSortedArray()
 {
     $sortedData = $this->data->getSortedArray();
     for ($i = 0; $i < $this->leafcount; ++$i) {
         /**
          * Leaf.
          *
          * @var \CommerceTeam\Commerce\Tree\Leaf\Leaf $leaf
          */
         $leaf =& $this->leafs[$i];
         $sortedData = array_merge($sortedData, $leaf->getSortedArray());
     }
     return $sortedData;
 }