Skip to content

Instantly share code, notes, and snippets.

@cameroncf
Created June 1, 2016 16:58
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save cameroncf/45c6220faa6d64ff08b6c8ee1c45217c to your computer and use it in GitHub Desktop.
Save cameroncf/45c6220faa6d64ff08b6c8ee1c45217c to your computer and use it in GitHub Desktop.
component
{
public void function setBFKey( string key ) {
request.somethinglongandmysterious = key;
}
public string function getBFKey() {
return request.somethinglongandmysterious;
}
public any function getBean( required string beanName ) {
getBeanFactory().getBean( arguments.beanName );
}
public any function getBeanFactory() {
return application[ getBFKey() ].factory; // get DI/1 factory
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment