Working with Doctrine in CodeIgniter PHP Framework
// On 'your_controller.php' file
// Eg. I'm using an entity called 'User' (replace with your own entity class)
include_once '/application/models/User.php';
// Get EntityManager Instance
$em = $this->doctrine->getEntityManager();
// My entity User for insert
$user = new User();
$user->setUserName('Your Name');
$user->setUserEmail('your@email.com');
$em->persist($user);
$em->flush();