Created
July 3, 2013 12:52
-
-
Save sachintaware/5917635 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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