2 |
3 | # Aplus Framework Config Library
4 |
5 | - [Home](https://aplus-framework.com/packages/config)
6 | - [User Guide](https://docs.aplus-framework.com/guides/libraries/config/index.html)
7 | - [API Documentation](https://docs.aplus-framework.com/packages/config.html)
8 |
9 | [](https://github.com/aplus-framework/config/actions/workflows/tests.yml)
10 | [](https://coveralls.io/github/aplus-framework/config?branch=master)
11 | [](https://packagist.org/packages/aplus/config)
12 | [](https://aplus-framework.com/sponsor)
13 |
--------------------------------------------------------------------------------
/src/Parsers/YamlParser.php:
--------------------------------------------------------------------------------
1 |
6 | *
7 | * For the full copyright and license information, please view the LICENSE
8 | * file that was distributed with this source code.
9 | */
10 | namespace Framework\Config\Parsers;
11 |
12 | /**
13 | * Class YamlParser.
14 | *
15 | * @package config
16 | */
17 | class YamlParser extends Parser
18 | {
19 | /**
20 | * Parses an YAML file.
21 | *
22 | * @param mixed $config path to the YAML file
23 | *
24 | * @throws ParserException
25 | *
26 | * @return arrayThis collector has not been added to a Config instance.
'; 47 | return \ob_get_clean(); // @phpstan-ignore-line 48 | } 49 | $count = \count($this->getConfigs()); 50 | \ob_start(); 51 | $dir = $this->config->getDir(); 52 | if ($dir !== null): 53 | ?> 54 |Config directory: = \htmlentities($dir) ?>
55 | 58 |= $count ?> configuration= $count === 1 ? '' : 's' ?> have been set.
59 | getTable(); 64 | return \ob_get_clean(); // @phpstan-ignore-line 65 | } 66 | 67 | protected function getTable() : string 68 | { 69 | \ob_start(); 70 | ?> 71 || Name | 75 |Instances | 76 |Values | 77 |Time to Load | 78 |||||
|---|---|---|---|---|---|---|---|
| = $config['name'] ?> | 87 |= $config['instances'][0]['name'] ?> | 88 |
89 |
90 |
|
108 | 109 | getData() as $value) { 112 | if ($value['name'] === $config['name']) { 113 | echo Debugger::roundSecondsToMilliseconds($value['end'] - $value['start']); 114 | $found = true; 115 | break; 116 | } 117 | } 118 | if (!$found) { 119 | echo 0; 120 | } 121 | ?> 122 | | 123 |||||
| = $config['instances'][$i]['name'] ?> | 127 |
128 |
129 |
|
147 |