Skip to content

Latest commit

 

History

History
38 lines (33 loc) · 1.23 KB

module-disks.md

File metadata and controls

38 lines (33 loc) · 1.23 KB
description
Use HMVC and define module disks

Module Disks

cbfs with HVMC

If you are creating your own ColdBox modules, you can create disks from those modules in the configure() lifecycle method in the ModuleConfig.cfc. You will do so by creating a cbfs key and adding either module disks or global disks.

  • disks : The collection of disks the module collaborates. Each name will be suffixed with the module name: key@moduleName
  • globalDisks : A collection of global name spaced disks the module contributes to the entire application.
component {
  function configure(){
	settings = {
	  // CBFS Module
	  cbfs : {
		// Disks that will be namespaced with the module name @diskModule
		// temp@diskModule
		// nasa@diskModule
		disks : {
			"temp" : { provider : "Ram" },
			"nasa" : { provider : "Ram" }
		},
		// No namespace in global spacing
		// temp
		// nasa
		globalDisks : {
			// Should be ignored, you can't override if it exists
			"temp" : { provider : "Ram" },
			"nasa" : { provider : "Ram" }
		}
	   }
	};
  }	
}