Lines Matching defs:line
48 foreach ($lines as $line) {
49 [$key, $val] = $this->splitLine($line);
53 // handle line commands (we allow various aliases here)
169 * Splits the given line into key and value
171 * @param $line
172 * @return array returns ['',''] if the line is empty
174 protected function splitLine($line)
177 $line = preg_replace('/(?<![&\\\\])#.*$/', '', $line);
178 $line = str_replace('\\#', '#', $line);
179 $line = trim($line);
180 if (empty($line)) return ['', ''];
182 $line = preg_split('/\s*:\s*/', $line, 2);
183 $line[0] = strtolower($line[0]);
184 if (!isset($line[1])) $line[1] = '';
186 return $line;
271 * @param string $line
274 protected function parseValues($line)
280 $len = strlen($line);
282 if ($line[$i] === '"') {
289 if (isset($line[$i + 1]) && $line[$i + 1] === '"') {
302 } elseif ($line[$i] === ',') {
315 $value .= $line[$i];
326 * @param string $line
329 protected function parseClasses($line)
331 $classes = $this->parseValues($line);