Skip to content
objectivehtml edited this page Dec 8, 2014 · 36 revisions

****Developers can take complete control of Postmaster and harness the power of its underlying API's. The following are the API's current available to developers.

  1. ParcelType API
  2. Service API

Registering Objects

Before you can use your classes in Postmaster you must register them.

// Register multiple services at once
craft()->postmaster->registerServices(array(
    'Craft\FooService',
    'Craft\YourService',
));

// One service at a time
craft()->postmaster->registerService('Craft\FooService');

// Register multiple parcel types at once
craft()->postmaster->registerParcelTypes(array(
    'Craft\FooParcelType',
    'Craft\YourParcelType',
));

// One parcel type at a time
craft()->postmaster->registerParcelType('Craft\FooParcelType');

ParcelType Api

The

Clone this wiki locally