?

Log in

No account? Create an account

Peter Rogers's Blog
Artist-in-Residence at Chez Firth

Friday (2/22/13) 11:55pm - ... wherein they should have sent a poet.

While working a freelance gig, I have encountered this line of PHP, in a file called "settings.php":

$api->Set('Settings', $settings);

What this code does:
It takes an object of type "Settings_API" that's defined in *another* file called "settings.php", and accesses the Settings_API's "Set" method.  "Set" then takes that first parameter, 'Settings', to indicate that this call should deal with a class variable that the API owns, which is an array called "$Settings".  Then, the Settings_API object sets *its* "$Settings" equal to the second parameter, $settings, which is an array that got set up just prior to this call.

YO DAWG

I HERD U LIKE SETTINGS

Tags: , ,
Mood: [mood icon] sad amazement · Music: none
Previous Entry Share Next Entry