<?php
/**
 * Description of GrowthExpSetting
 *
 * @author user
 */
class GrowthExpSetting {
    //put your code here
    public function getData() {
        $growthExpWay = new GrowthExpWay();
        $growthExpWayPackage = new GrowthExpWayPackage();
        $brokerGroup = new BrokerGroup();
        $packages = $brokerGroup->getExpBrokerGroup();
        $data_info = $growthExpWay->findAllByDisplayable();
        if(CommonBase::isFullArray($data_info)) {
            foreach ($data_info as $key => &$value) {
                $wayAlias = $value['alias'];
                $value['typeString'] = GrowthCreditWay::$type[$value['type']];
				if ($packages) {
					foreach($packages as $package) {
						$packageId = $package['id'];
						$value['packageScore'.$packageId] = $growthExpWayPackage->
								findScoreByWayAliasAndPackageId($wayAlias,$packageId);
					}
				}
            }
        }
        return $data_info;
    }
}
