Retrieving Channels
Though not a common use case, you can retrieve configured Channel instances using the Megaphone Channel WireBox DSL.
// config/modules/megaphone.cfc
component {
function configure() {
return {
"channels": {
// this is the unique name for the channel
"database": {
"provider": "DatabaseProvider@megaphone",
"properties": {
// this is the default table name
"tableName": "megaphone_notifications",
"datasource": "megaphone"
}
}
}
};
}
}
var databaseChannel = wirebox.getInstance( "megaphone:database" );
Last updated