PHP 클래스 Atrauzzi\LaravelDoctrine\Type\Json

Doctrine has a json_array type but, as its name suggests, it was designed with only arrays in mind. This extending type fixes a bug with the json_array type wherein a null value in database gets converted to an empty array. IMPORTANT NOTE: you must register custom types with Doctrine: \Doctrine\DBAL\Types\Type::addType('json', '\Path\To\Custom\Type\Json'); Note from atrauzzi: I'm including this as a convenience for anyone using my package.
상속: extends Doctrine\DBAL\Types\JsonArrayType
파일 보기 프로젝트 열기: atrauzzi/laravel-doctrine

공개 메소드들

메소드 설명
convertToPHPValue ( $value, Doctrine\DBAL\Platforms\AbstractPlatform $platform ) When database value is null, we return null instead of empty array like our parent does.
getName ( )
getSQLDeclaration ( array $fieldDeclaration, Doctrine\DBAL\Platforms\AbstractPlatform $platform ) Made to be compatible with Doctrine 2.4 and 2.5; 2.5 added getJsonTypeDeclarationSQL().

메소드 상세

convertToPHPValue() 공개 메소드

public convertToPHPValue ( $value, Doctrine\DBAL\Platforms\AbstractPlatform $platform )
$platform Doctrine\DBAL\Platforms\AbstractPlatform

getName() 공개 메소드

public getName ( )

getSQLDeclaration() 공개 메소드

public getSQLDeclaration ( array $fieldDeclaration, Doctrine\DBAL\Platforms\AbstractPlatform $platform )
$fieldDeclaration array
$platform Doctrine\DBAL\Platforms\AbstractPlatform