PHP 클래스 Puli\Manager\Json\JsonStorage

부터: 1.0
저자: Bernhard Schussek ([email protected])
파일 보기 프로젝트 열기: puli/manager 1 사용 예제들

공개 메소드들

메소드 설명
__construct ( Puli\Manager\Api\Storage\Storage $storage, JsonConverterProvider $converterProvider, JsonEncoder $jsonEncoder, JsonDecoder $jsonDecoder, Puli\Manager\Api\Factory\FactoryManager $factoryManager = null ) Creates a new storage.
loadConfigFile ( string $path, Puli\Manager\Api\Config\Config $baseConfig = null ) : Puli\Manager\Api\Config\ConfigFile Loads a configuration file from a path.
loadModuleFile ( string $path ) : ModuleFile Loads a module file from a file path.
loadRootModuleFile ( string $path, Puli\Manager\Api\Config\Config $baseConfig ) : RootModuleFile Loads a root module file from a file path.
saveConfigFile ( Puli\Manager\Api\Config\ConfigFile $configFile ) Saves a configuration file.
saveModuleFile ( ModuleFile $moduleFile ) Saves a module file.
saveRootModuleFile ( RootModuleFile $moduleFile ) Saves a root module file.

비공개 메소드들

메소드 설명
decode ( $json, $path )
encode ( stdClass $jsonData, $path )
loadFile ( $path, $className, array $options = [] )
saveFile ( $file, $path, array $options = [] )

메소드 상세

__construct() 공개 메소드

Creates a new storage.
public __construct ( Puli\Manager\Api\Storage\Storage $storage, JsonConverterProvider $converterProvider, JsonEncoder $jsonEncoder, JsonDecoder $jsonDecoder, Puli\Manager\Api\Factory\FactoryManager $factoryManager = null )
$storage Puli\Manager\Api\Storage\Storage The file storage.
$converterProvider JsonConverterProvider The provider for the JSON converters.
$jsonEncoder Webmozart\Json\JsonEncoder The JSON encoder.
$jsonDecoder Webmozart\Json\JsonDecoder The JSON decoder.
$factoryManager Puli\Manager\Api\Factory\FactoryManager The manager used to regenerate the factory class after saving a file.

loadConfigFile() 공개 메소드

Loads a configuration file from a path.
public loadConfigFile ( string $path, Puli\Manager\Api\Config\Config $baseConfig = null ) : Puli\Manager\Api\Config\ConfigFile
$path string The path to the configuration file.
$baseConfig Puli\Manager\Api\Config\Config The configuration that the loaded configuration will inherit its values from.
리턴 Puli\Manager\Api\Config\ConfigFile The loaded configuration file.

loadModuleFile() 공개 메소드

Loads a module file from a file path.
public loadModuleFile ( string $path ) : ModuleFile
$path string The path to the module file.
리턴 Puli\Manager\Api\Module\ModuleFile The loaded module file.

loadRootModuleFile() 공개 메소드

Loads a root module file from a file path.
public loadRootModuleFile ( string $path, Puli\Manager\Api\Config\Config $baseConfig ) : RootModuleFile
$path string The path to the module configuration file.
$baseConfig Puli\Manager\Api\Config\Config The configuration that the module will inherit its configuration values from.
리턴 Puli\Manager\Api\Module\RootModuleFile The loaded module file.

saveConfigFile() 공개 메소드

The configuration file is saved to the same path that it was read from.
public saveConfigFile ( Puli\Manager\Api\Config\ConfigFile $configFile )
$configFile Puli\Manager\Api\Config\ConfigFile The configuration file to save.

saveModuleFile() 공개 메소드

The module file is saved to the same path that it was read from.
public saveModuleFile ( ModuleFile $moduleFile )
$moduleFile Puli\Manager\Api\Module\ModuleFile The module file to save.

saveRootModuleFile() 공개 메소드

The module file is saved to the same path that it was read from.
public saveRootModuleFile ( RootModuleFile $moduleFile )
$moduleFile Puli\Manager\Api\Module\RootModuleFile The module file to save.