Follow us on Twitter X-Cart on Facebook Wiki
Shopping cart software Solutions for online shops and malls
 

Printing Doctrine Objects

 
Reply
   X-Cart forums > X-Cart 5 > Dev Questions (X-Cart 5)
 
Thread Tools Search this Thread
  #1  
Old 08-02-2014, 02:34 PM
  totaltec's Avatar 
totaltec totaltec is offline
 

X-Guru
  
Join Date: Jan 2007
Location: Louisville, KY USA
Posts: 5,823
 

Default Printing Doctrine Objects

When I first started working with X-cart 5, I had no idea how to print the contents of objects to the screen. Just now I forgot and had to go look it up again...

X-cart 5 is not just OOP PHP vs Procedural PHP, it also utilizes Doctrine for working with the DB.Those unfamiliar with Doctrine can have a hard time!

Sharing it here for all that are looking:

print_r($entity);
Should be actually:
\Doctrine\Common\Util\Debug::dump($entity);

Taken from:
http://www.davelachapelle.ca/2013/01/25/dumping-doctrine-entities-without-print_r/
__________________
Mike White - Now Accepting new clients and projects! Work with the best, get a US based development team for just $125 an hour. Call 1-502-773-6454, email mike at babymonkeystudios.com, or skype b8bym0nkey

XcartGuru
X-cart Tutorials | X-cart 5 Tutorials

Check out the responsive template for X-cart.
Reply With Quote

The following 3 users thank totaltec for this useful post:
cflsystems (08-02-2014), jp@ewaycorp.com (08-20-2014), tony_sologubov (08-05-2014)
Reply
   X-Cart forums > X-Cart 5 > Dev Questions (X-Cart 5)



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -8. The time now is 09:11 AM.

   

 
X-Cart forums © 2001-2020