This function’s access is marked private. This means it is not intended for use by plugin or theme developers, only in other core functions. It is listed here for completeness.
Parser::parseName( string $name )
Strips quotes and the optional leading “export ” from the variable name.
Parameters
- $name
-
(Required)
Return
(string)
Source
File: vendor/vlucas/phpdotenv/src/Parser.php
private static function parseName($name)
{
$name = trim(str_replace(['export ', '\'', '"'], '', $name));
if (!self::isValidName($name)) {
throw new InvalidFileException(
self::getErrorMessage('an invalid name', $name)
);
}
return $name;
}