| Total Complexity | 6 |
| Total Lines | 62 |
| Duplicated Lines | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 18 | class Ini |
||
| 19 | { |
||
| 20 | /** |
||
| 21 | * 自定义 ini 配置 |
||
| 22 | */ |
||
| 23 | const TYPE_INI = 'ini'; |
||
| 24 | /** |
||
| 25 | * JSON 配置 |
||
| 26 | */ |
||
| 27 | const TYPE_JSON = 'json'; |
||
| 28 | /** |
||
| 29 | * XML 配置 |
||
| 30 | */ |
||
| 31 | const TYPE_XML = 'xml'; |
||
| 32 | |||
| 33 | /** |
||
| 34 | * 配置类型 |
||
| 35 | * |
||
| 36 | * @var string |
||
| 37 | */ |
||
| 38 | protected $_type; |
||
| 39 | /** |
||
| 40 | * 文件路径 |
||
| 41 | * |
||
| 42 | * @var string |
||
| 43 | */ |
||
| 44 | protected $_file; |
||
| 45 | |||
| 46 | /** |
||
| 47 | * 构造函数 |
||
| 48 | * |
||
| 49 | * @param string $file |
||
| 50 | * @param string $type |
||
| 51 | */ |
||
| 52 | public function __construct($file, $type = self::TYPE_INI) |
||
| 56 | } |
||
| 57 | |||
| 58 | /** |
||
| 59 | * 转成数组 |
||
| 60 | * |
||
| 61 | * @return array |
||
| 62 | */ |
||
| 63 | public function toArray() |
||
| 82 |