src/Translation/LanguageParser.php
/**
	 * Parses the namespace and verifies it is in the correct format. Returns the parsed version.
	 *
	 * @param string $line
	 * @param int $lineNumber
	 * @return string
	 */
Parses the namespace and verifies it is in the correct format. Returns the parsed version.
@param string $line
@param int $lineNumber
@return string
Parses the namespace and verifies it is in the correct format . Returns the parsed version . @param string $line @param int $lineNumber @return string
protected function parseNamespace($line, $lineNumber) {
		$namespace = trim($line);
		if (!preg_match('/^([^0-9][a-zA-Z0-9._:-]+)$/', $namespace)) {
			throw new LanguageException(sprintf('Parse error: Invalid namespace "%s" on line %d.', $namespace, $lineNumber));
		}
		return strtolower($namespace);
	}
protected function parseNamespace ( $ line , $ lineNumber ) { $ namespace = trim ( $ line ) ; if ( ! preg_match ( '/^([^0-9][a-zA-Z0-9._:-]+)$/' , $ namespace ) ) { throw new LanguageException ( sprintf ( 'Parse error: Invalid namespace "%s" on line %d.' , $ namespace , $ lineNumber ) ) ; } return strtolower ( $ namespace ) ; }
Parses the namespace and verifies it is in the correct format.
Parses the namespace and verifies it is in the correct format .