Skip Navigation
Expand
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?

Environment:

Connect for PHP (CPHP)
Oracle B2C Service

Resolution:

A good way to use the CPHP getMetadata function is to also 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