Collapse
Submit a Service Request
Contact Information for Technical Support
My Service Notifications
Using the Connect for PHP (CPHP) getMetadata function with custom objects
Answer ID 11725 |
Last Review Date 10/20/2020
How do I use the CPHP getMetadata function with custom objects?
Environment:
Connect for PHP (CPHP), Custom Objects
Oracle B2C Service
Resolution:
A good way to use the CPHP getMetadata function with custom objects is to use the PHP get_class function, as in this example:
$className = get_class($obj);
$objMetadata = $className::getMetadata();
For details see the 'Metadata' and 'Introspection Functions' sections of the CPHP product feature technical documentation found here
Answer ID 5169: Technical Documentation and Sample Code