PHP 클래스 Cascade\Config\Loader\FileLoader\Json

또한 보기: FileLoaderAbstract
저자: Raphael Antonmattei ([email protected])
상속: extends FileLoaderAbstract
파일 보기 프로젝트 열기: theorchard/monolog-cascade

공개 프로퍼티들

프로퍼티 타입 설명
$validExtensions array Valid file extensions for this loader

공개 메소드들

메소드 설명
load ( string $resource, string | null $type = null ) : array Load a JSON string/file
supports ( string $resource, string $type = null ) : boolean Return whether or not the passed in resrouce is supported by this loader

비공개 메소드들

메소드 설명
isJson ( string $string ) : boolean Determine whether a given string is supposed to be a Json string This is a very simplified validation to avoid calling json_decode (which is much more expensive). If the json is invalid, it will throw an exception when we actually load it.

메소드 상세

load() 공개 메소드

Load a JSON string/file
public load ( string $resource, string | null $type = null ) : array
$resource string JSON string or file path to a JSON file
$type string | null Not used.
리턴 array Array containing data from the parsed JSON string or file

supports() 공개 메소드

Return whether or not the passed in resrouce is supported by this loader
public supports ( string $resource, string $type = null ) : boolean
$resource string Plain string or filepath
$type string Not used
리턴 boolean Whether or not the passed in resource is supported by this loader

프로퍼티 상세

$validExtensions 공개적으로 정적으로 프로퍼티

Valid file extensions for this loader
public static array $validExtensions
리턴 array