/** * 获取一个对象实例,并缓存 */ public static function getInstance(array $type) { if (!isset(self::$_accountBo)) { self::$_accountBo = new self($type); } return self::$_accountBo; }
/** *获取启用中的账号通的类型 */ public function getAccountType() { $info = App_Account_InfoBo::getInstance($this->_getAccountTypeService()->getType())->getAccountInfo(); if (!$info) { return false; } $typeFilter = array(); foreach ($info as $v) { if ($v['status']) { $typeFilter[] = array('type' => $v['type'], 'order' => intval($v['display_order'])); } } if (!$typeFilter) { return false; } $typeFilter = $this->array_sort($typeFilter, 'order'); $result = array(); foreach ($typeFilter as $key => $value) { $result[] = $value['type']; } return $result; }