Article ID: 121855, created on Jun 2, 2014, last review on Aug 12, 2014

  • Applies to:
  • APS 2.x

Symptoms

I need to create an object of a specific APS type so I can later use this object with registerResource and create a new resource of this type.

Resolution

You should use the newResourceByTypeId method:

$resource = \APS\TypeLibrary::newResourceByTypeId("http://sp.parallels.com/aps/types/pa/dns/record/a/1.0");

$resource->property1 = "value1";
$resource->property2 = "value2";

$apsc->registerResource($resource);

You could use POA internal types as well as your own types or types of other applications registered in POA with newResourceByTypeId.

70bf700e0cdb9d7211df2595ef7276ab 717db81efe94e616312b74fb03a5d474

Email subscription for changes to this article
Save as PDF