PHP Class Action_Helper_Entity

Inheritance: extends Zend_Controller_Action_Helper_Abstract
Show file Open project: sourcefabric/newscoop

Public Methods

Method Description
direct ( mixed $entity, string $key, boolean $throw = TRUE ) : object | null Direct strategy
find ( string $entity, mixed $key ) : object Find entity
flushManager ( ) : void Flush entity manager
get ( mixed $entity, string $key = 'id', boolean $throw = TRUE ) : object | null Get entity by parameter
getManager ( ) : EntityManager Get entity manager
getRepository ( $entity ) : Doctrine\ORM\EntityRepository Get entity repository
init ( ) : Action_Helper_Entity Init Entity manager
setManager ( EntityManager $em ) : Action_Helper_Entity Set entity manager

Private Methods

Method Description
getClassName ( mixed $entity ) : string Get entity name

Method Details

direct() public method

Direct strategy
public direct ( mixed $entity, string $key, boolean $throw = TRUE ) : object | null
$entity mixed
$key string
$throw boolean
return object | null

find() public method

Find entity
public find ( string $entity, mixed $key ) : object
$entity string
$key mixed
return object

flushManager() public method

Flush entity manager
public flushManager ( ) : void
return void

get() public method

Get entity by parameter
public get ( mixed $entity, string $key = 'id', boolean $throw = TRUE ) : object | null
$entity mixed
$key string
$throw boolean
return object | null

getManager() public method

Get entity manager
public getManager ( ) : EntityManager
return Doctrine\ORM\EntityManager

getRepository() public method

Get entity repository
public getRepository ( $entity ) : Doctrine\ORM\EntityRepository
return Doctrine\ORM\EntityRepository

init() public method

Init Entity manager
public init ( ) : Action_Helper_Entity
return Action_Helper_Entity

setManager() public method

Set entity manager
public setManager ( EntityManager $em ) : Action_Helper_Entity
$em Doctrine\ORM\EntityManager
return Action_Helper_Entity