PHP Класс Neos\Flow\Configuration\Source\YamlSource

Показать файл Открыть проект Примеры использования класса

Защищенные свойства (Protected)

Свойство Тип Описание
$usePhpYamlExtension boolean Having this installed massively improves YAML parsing performance.

Открытые методы

Метод Описание
__construct ( )
has ( string $pathAndFilename, boolean $allowSplitSource = false ) : boolean Checks for the specified configuration file and returns TRUE if it exists.
load ( string $pathAndFilename, boolean $allowSplitSource = false ) : array Loads the specified configuration file and returns its content as an array. If the file does not exist or could not be loaded, an empty array is returned
save ( string $pathAndFilename, array $configuration ) : void Save the specified configuration array to the given file in YAML format.

Защищенные методы

Метод Описание
getHeaderFromFile ( string $pathAndFilename ) : string Read the header part from the given file. That means, every line until the first non comment line is found.

Описание методов

__construct() публичный метод

public __construct ( )

getHeaderFromFile() защищенный метод

Read the header part from the given file. That means, every line until the first non comment line is found.
protected getHeaderFromFile ( string $pathAndFilename ) : string
$pathAndFilename string
Результат string The header of the given YAML file

has() публичный метод

Checks for the specified configuration file and returns TRUE if it exists.
public has ( string $pathAndFilename, boolean $allowSplitSource = false ) : boolean
$pathAndFilename string Full path and filename of the file to load, excluding the file extension (ie. ".yaml")
$allowSplitSource boolean If TRUE, the type will be used as a prefix when looking for configuration files
Результат boolean

load() публичный метод

Loads the specified configuration file and returns its content as an array. If the file does not exist or could not be loaded, an empty array is returned
public load ( string $pathAndFilename, boolean $allowSplitSource = false ) : array
$pathAndFilename string Full path and filename of the file to load, excluding the file extension (ie. ".yaml")
$allowSplitSource boolean If TRUE, the type will be used as a prefix when looking for configuration files
Результат array

save() публичный метод

Save the specified configuration array to the given file in YAML format.
public save ( string $pathAndFilename, array $configuration ) : void
$pathAndFilename string Full path and filename of the file to write to, excluding the dot and file extension (i.e. ".yaml")
$configuration array The configuration to save
Результат void

Описание свойств

$usePhpYamlExtension защищенное свойство

Having this installed massively improves YAML parsing performance.
См. также: http://pecl.php.net/package/yaml
protected bool $usePhpYamlExtension
Результат boolean