Is there an easy way to get Doctrine's entity manager from within an entity's class method?
<?php
/** @Entity */
class MyEntity {
/** @Id @GeneratedValue @Column(type="integer") */
protected $id;
[...]
public function someFunction() {
// Is there any way to get Doctrine's EntityManager in here?
}
}