Ubiquity 2.5.2
php rapid development framework
Loading...
Searching...
No Matches
YamlImportation.php
Go to the documentation of this file.
1<?php
3
5
6 public function load() {
7 $content = \file_get_contents($this->file);
8 $lines = \explode("\n", $content);
9 $result = [];
10 foreach ($lines as $line) {
11 $line = \trim($line);
12 if (\substr($line, 0, \strlen('#')) !== '#') {
13 $kv = \explode(':', $line);
14 if (\count($kv) == 2) {
15 $result[\trim($kv[0])] = \trim($kv[1]);
16 }
17 }
18 }
19 return $result;
20 }
21}
22