PHP 클래스 eZ\Publish\Core\REST\Common\Output\Generator\Json\FieldTypeHashGenerator

파일 보기 프로젝트 열기: ezsystems/ezpublish-kernel 1 사용 예제들

공개 메소드들

메소드 설명
generateHashValue ( ArrayObject | Object $parent, string $hashElementName, mixed $hashValue ) Generates the field type value $hashValue as a child of the given Object using $hashElementName as the property name.

보호된 메소드들

메소드 설명
generateArrayValue ( ArrayObject | Object $parent, array $value ) : ArrayObject | Object Generates and returns a JSON structure (array or object) depending on $value type with $parent.
generateHashArray ( ArrayObject | Object $parent, array $hashArray ) : Object Generates a JSON object from the given $hashArray with $parent.
generateListArray ( ArrayObject | Object $parent, array $listArray ) : ArrayObject Generates a JSON array from the given $hashArray with $parent.
generateValue ( ArrayObject | Object $parent, mixed $value ) : mixed Generates and returns a value based on $hashValue type, with $parent ( if the type of $hashValue supports it).
isNumericArray ( array $value ) : boolean Checks if the given $value is a purely numeric array.

메소드 상세

generateArrayValue() 보호된 메소드

If $type only contains numeric keys, the resulting structure will be an JSON array, otherwise a JSON object
protected generateArrayValue ( ArrayObject | Object $parent, array $value ) : ArrayObject | Object
$parent ArrayObject | Object
$value array
리턴 ArrayObject | Object

generateHashArray() 보호된 메소드

Generates a JSON object from the given $hashArray with $parent.
protected generateHashArray ( ArrayObject | Object $parent, array $hashArray ) : Object
$parent ArrayObject | Object
$hashArray array
리턴 Object

generateHashValue() 공개 메소드

Generates the field type value $hashValue as a child of the given Object using $hashElementName as the property name.
public generateHashValue ( ArrayObject | Object $parent, string $hashElementName, mixed $hashValue )
$parent ArrayObject | Object
$hashElementName string
$hashValue mixed

generateListArray() 보호된 메소드

Generates a JSON array from the given $hashArray with $parent.
protected generateListArray ( ArrayObject | Object $parent, array $listArray ) : ArrayObject
$parent ArrayObject | Object
$listArray array
리턴 ArrayObject

generateValue() 보호된 메소드

Generates and returns a value based on $hashValue type, with $parent ( if the type of $hashValue supports it).
protected generateValue ( ArrayObject | Object $parent, mixed $value ) : mixed
$parent ArrayObject | Object
$value mixed
리턴 mixed

isNumericArray() 보호된 메소드

Checks if the given $value is a purely numeric array.
protected isNumericArray ( array $value ) : boolean
$value array
리턴 boolean