src/ActiveDoctrine/Entity/EntityCollection.php
public function getOne($column, $value, $strict = true)
    {
        if ($strict) {
            foreach ($this->entities as $entity) {
                if ($entity->get($column) === $value) {
                    return $entity;
                }
            }
        } else {
            foreach ($this->entities as $entity) {
                if ($entity->get($column) == $value) {
                    return $entity;
                }
            }
        }

        return;
    }
public function getOne($column, $value, $strict = true)
    {
        if ($strict) {
            foreach ($this->entities as $entity) {
                if ($entity->get($column) === $value) {
                    return $entity;
                }
            }
        } else {
            foreach ($this->entities as $entity) {
                if ($entity->get($column) == $value) {
                    return $entity;
                }
            }
        }

        return;
    }
public function getOne ( $ column , $ value , $ strict = true ) { if ( $ strict ) { foreach ( $ this -> entities as $ entity ) { if ( $ entity -> get ( $ column ) === $ value ) { return $ entity ; } } } else { foreach ( $ this -> entities as $ entity ) { if ( $ entity -> get ( $ column ) == $ value ) { return $ entity ; } } } return ; }
Get a single Entity from this collection where column =
value. If more than one Entity is matched, the first will be
returned. If no Entity is matched, null will be returned.

@param  string $column
@param  string $value
@param  bool   $strict use strict comparison when comparing values
@return mixed  Entity or NULL
Get a single Entity from this collection where column = value . If more than one Entity is matched the first will be returned . If no Entity is matched null will be returned .