PHP 클래스 NerdsAndCompany\Schematic\Models\Data

Encapsulates data that has been exported via schematic.
저자: Nerds & Company
상속: extends Craft\BaseModel
파일 보기 프로젝트 열기: itmundi/schematic 1 사용 예제들

공개 메소드들

메소드 설명
fromYaml ( string $yaml, string $overrideYaml ) : Data Populate data model from yaml.
getAttribute ( string $attribute, boolean | false $flattenValue = false, array $default = [] ) : array
replaceEnvVariables ( string $yaml ) : string Replace placeholders with enviroment variables.
toYaml ( array $data ) : Data Populate yaml from data model.

보호된 메소드들

메소드 설명
defineAttributes ( ) Define attributes.

메소드 상세

defineAttributes() 보호된 메소드

protected defineAttributes ( )

fromYaml() 공개 정적인 메소드

Populate data model from yaml.
public static fromYaml ( string $yaml, string $overrideYaml ) : Data
$yaml string
$overrideYaml string
리턴 Data

getAttribute() 공개 메소드

public getAttribute ( string $attribute, boolean | false $flattenValue = false, array $default = [] ) : array
$attribute string
$flattenValue boolean | false
$default array
리턴 array

replaceEnvVariables() 공개 정적인 메소드

Placeholders start with % and end with %. This will be replaced by the environment variable with the name SCHEMATIC_{PLACEHOLDER}. If the environment variable is not set an exception will be thrown.
public static replaceEnvVariables ( string $yaml ) : string
$yaml string
리턴 string

toYaml() 공개 정적인 메소드

Populate yaml from data model.
public static toYaml ( array $data ) : Data
$data array
리턴 Data