Skip to content

Instantly share code, notes, and snippets.

@sachintaware
Created July 3, 2013 12:52
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save sachintaware/5917635 to your computer and use it in GitHub Desktop.
Save sachintaware/5917635 to your computer and use it in GitHub Desktop.
<?php
###################################################################################################
# READING A VALUE FROM YOUR "DEFAULT" CREDENTIAL SET
CFCredentials::get()->key # my-key
CFCredentials::get()->secret # my-secret
CFCredentials::get()->default_cache_config # apc
CFCredentials::get()->certificate_authority # false
// This is exactly the same as specifying "@default"...
CFCredentials::get('@default')->key # my-key
CFCredentials::get('@default')->secret # my-secret
CFCredentials::get('@default')->default_cache_config # apc
CFCredentials::get('@default')->certificate_authority # false
###################################################################################################
# READING A VALUE FROM A SPECIFIC CREDENTIAL SET
CFCredentials::get('production')->key # production-key
CFCredentials::get('production')->secret # production-secret
CFCredentials::get('production')->default_cache_config # apc
CFCredentials::get('production')->certificate_authority # false
// Or even read values back from multiple credential sets...
CFCredentials::get('personal-aws-account')->mfa_serial # null
CFCredentials::get('business-aws-account')->mfa_serial # GK00XXXX
// Or even...
CFCredentials::get('nonsense')->am_i_wearing_a_silly_hat # true
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment