/** * * Init forms: * * GET * Conference('conference-id') * Conference() * * POST * Conference(array) */ public function __construct() { $data = Ensure::Input(func_get_args()); parent::_init($data, new DependsResource(), new LoadsResource(array("primary" => "GET", "id" => "id", "silent" => false)), new SchemaResource(array("fields" => array("id", "state", "from", "created_time", "completed_time", "fallback_url"), "needs" => array("id", "state", "from"))), new SubFunctionResource(array(array("type" => "get", "term" => "members"), array("type" => "add", "term" => "members"), array("type" => "update", "term" => "member")))); }
/** * CTor for conference memebrs * * Init forms: * GET * ConferenceMember('member-id') * ConferenceMember() * * POST * ConferenceMember('conference-id', array) * ConferenceMember(array) */ public function __construct() { $data = Ensure::Input(func_get_args()); parent::_init($data, new DependsResource(array(array("term" => "conference", "plural" => true, "silent" => false))), new LoadsResource(array("primary" => "GET", "init" => array("conferenceId"), "id" => "id")), new SchemaResource(array("fields" => array('id', 'state', 'added_time', 'hold', 'mute', 'join_tone', 'leaving_tone'), "needs" => array("id", "state", "from")))); }
/** * construct the call as initiated or new * each constructor must have a way to call itself's create/1 function with the * arguments * * init forms * * GET: * Call('call-id') * Call('conference-id', 'call-id') * Call() * * POST * Call('conference-id', array) * Call(array) * */ public function __construct() { $data = Ensure::Input(func_get_args()); parent::_init($data, new DependsResource(), new LoadsResource(array("primary" => "GET", "id" => "id", "init" => array("conferenceId"), "silent" => false)), new SchemaResource(array("fields" => array('id', 'from', 'to', 'recordingEnabled', 'recordingFileFormat', 'callbackUrl', 'events', 'direction', 'callbackHttpMethod', 'state', 'startTime', 'endTime', 'activeTime', 'bridgeId'), "needs" => array("id", "direction", "from", "to"))), new SubFunctionResource(array(array("term" => "transcriptions", "type" => "get"), array("term" => "recordings", "type" => "get"), array("term" => "events", "type" => "get")))); }