Form\ChoiceList\IdReader (Bridge\Doctrine)

Symfony\Bridge\Doctrine\Form\ChoiceList\IdReader

class IdReader

A utility for reading object IDs.

Methods

__construct(ObjectManager $om, ClassMetadata $classMetadata)
bool isSingleId()

Returns whether the class has a single-column ID.

bool isIntId()

Returns whether the class has a single-column integer ID.

mixed getIdValue(object $object)

Returns the ID value for an object.

string getIdField()

Returns the name of the ID field.

Details

public __construct(ObjectManager $om, ClassMetadata $classMetadata)

Parameters

ObjectManager $om
ClassMetadata $classMetadata

public bool isSingleId()

Returns whether the class has a single-column ID.

Return Value

bool Returns true if the class has a single-column ID and false otherwise.

public bool isIntId()

Returns whether the class has a single-column integer ID.

Return Value

bool Returns true if the class has a single-column integer ID and false otherwise.

public mixed getIdValue(object $object)

Returns the ID value for an object.

This method assumes that the object has a single-column ID.

Parameters

object $object The object.

Return Value

mixed The ID value.

public string getIdField()

Returns the name of the ID field.

This method assumes that the object has a single-column ID.

Return Value

string The name of the ID field.

© 2004–2016 Fabien Potencier
Licensed under the MIT License.
http://api.symfony.com/3.0/Symfony/Bridge/Doctrine/Form/ChoiceList/IdReader.html

在线笔记
App下载
App下载

扫描二维码

下载编程狮App

公众号
微信公众号

编程狮公众号

意见反馈
返回顶部