Wants to convert doctrine entiry object to normal array, this is my code so far,
$demo = $this->doctrine->em->find('EntityUser',2);
Getting entity object ,
EntityUser Object
(
[id:EntityUser:private] => 2
[username:EntityUser:private] => TestUser
[password:EntityUser:private] => 950715f3f83e20ee154995cd5a89ac75
[email:EntityUser:private] => [email protected]
[firm_id:EntityUser:private] => EntityFirm Object
(
[id:EntityFirm:private] => 16
[company_name:EntityFirm:private] => TestFirm
[company_detail:EntityFirm:private] => India
[created_at:EntityFirm:private] => DateTime Object
(
[date] => 2014-08-01 18:16:08
[timezone_type] => 3
[timezone] => Europe/Paris
)
[user:EntityFirm:private] =>
)
[created_at:EntityUser:private] => DateTime Object
(
[date] => 2014-08-01 15:12:36
[timezone_type] => 3
[timezone] => Europe/Paris
)
[updated_at:EntityUser:private] => DateTime Object
(
[date] => 2014-08-01 15:12:36
[timezone_type] => 3
[timezone] => Europe/Paris
)
[firm:protected] =>
) ,
Tried this ,But as per my requiremnet do not want to user doctrine_query.
Thanks.
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…