PageRenderTime 24ms CodeModel.GetById 12ms RepoModel.GetById 0ms app.codeStats 0ms

/wheels/plugins/injection.cfm

http://cfwheels.googlecode.com/
ColdFusion | 33 lines | 33 code | 0 blank | 0 comment | 0 complexity | 03eaa75d1ee93a4b57a28de949b21b63 MD5 | raw file
Possible License(s): Apache-2.0, CPL-1.0
  1. <cfscript>
  2. // we use $wheels here since these variables get placed in the variables scope of all objects and we need
  3. // to make sure they don't clash with other wheels variables or any variables the develoepr may set
  4. if (!StructIsEmpty(application.wheels.mixins))
  5. {
  6. $wheels.metaData = GetMetaData(this);
  7. if (StructKeyExists($wheels.metaData, "displayName"))
  8. $wheels.className = $wheels.metaData.displayName;
  9. else
  10. $wheels.className = Reverse(SpanExcluding(Reverse($wheels.metaData.name), "."));
  11. if (StructKeyExists(application.wheels.mixins, $wheels.className))
  12. {
  13. if (!StructKeyExists(variables, "core"))
  14. {
  15. if (application.wheels.serverName eq "Railo")
  16. {
  17. // this is to work around the railo bug
  18. // https://jira.jboss.org/browse/RAILO-936
  19. variables.core = duplicate(variables);
  20. }
  21. else
  22. {
  23. variables.core = {};
  24. StructAppend(variables.core, variables);
  25. StructDelete(variables.core, "$wheels", false);
  26. }
  27. }
  28. StructAppend(variables, application.wheels.mixins[$wheels.className], true);
  29. }
  30. // get rid of any extra data created in the variables scope
  31. StructDelete(variables, "$wheels", false);
  32. }
  33. </cfscript>