PHP 클래스 Symfony\Bundle\DoctrineBundle\Form\ValueTransformer\CollectionToStringTransformer

Use-Cases for this transformer include: List of Tag-Names, List Of Group/User-Names or the like. This transformer only makes sense if you know the list of related collections to be small and that they have a unique identifier field that is of meaning to the user (Tag Names) and is enforced to be unique in the storage. This transformer can cause the following SQL operations to happen in the case of an ORM collection: 1. Initialize the whole collection using one SELECT query 2. For each removed element issue an UPDATE or DELETE stmt (depending on one-to-many or many-to-many) 3. For each inserted element issue an INSERT or UPDATE stmt (depending on one-to-many or many-to-many) 4. Extra updates if necessary by the ORM.
저자: Benjamin Eberlei ([email protected])
상속: extends Symfony\Component\Form\ValueTransformer\BaseValueTransformer
파일 보기 프로젝트 열기: pmjones/php-framework-benchmarks

공개 메소드들

메소드 설명
reverseTransform ( string $value, Doctrine\Common\Collections\Collection $collection )
transform ( Doctrine\Common\Collections\Collection $value ) : string Transform a Doctrine Collection into a string of identifies with a separator.

보호된 메소드들

메소드 설명
configure ( )

메소드 상세

configure() 보호된 메소드

protected configure ( )

reverseTransform() 공개 메소드

public reverseTransform ( string $value, Doctrine\Common\Collections\Collection $collection )
$value string
$collection Doctrine\Common\Collections\Collection

transform() 공개 메소드

Transform a Doctrine Collection into a string of identifies with a separator.
public transform ( Doctrine\Common\Collections\Collection $value ) : string
$value Doctrine\Common\Collections\Collection
리턴 string