Trait FileConfigTrait
Trait providing utility methods for file based config engines.
Namespace: Cake\Core\Configure
Property Summary
-
$extension public @property-read
stringThe file extension used by the engine.
-
$path protected
stringThe path this engine finds files on.
Method Summary
-
getFilePath() protected
Get file path
Method Detail
getFilePath() ¶ protected
getFilePath(string $key, bool $checkExists = false): string
Get file path
Parameters
-
string$key The identifier to write to. If the key has a . it will be treated as a plugin prefix.
-
bool$checkExists optional Whether to check if file exists. Defaults to false.
Returns
stringFull file path
Throws
Cake\Core\Exception\CakeExceptionWhen files don't exist or when files contain '..' as this could lead to abusive reads.