Skip to content

Instantly share code, notes, and snippets.

@dragoonis
Created February 28, 2012 16:05
Show Gist options
  • Save dragoonis/1933367 to your computer and use it in GitHub Desktop.
Save dragoonis/1933367 to your computer and use it in GitHub Desktop.
<?php
class Application {
protected $_myStuff = null;
protected function getSomeStuffFromPHP() {
if($this->_myStuff === null) {
include_once(CONFIGPATH . 'myExtraData.php';
$this->_myStuff = $varFromConfigFile;
}
$data = $this->_myStuff;
// .. more work here
// return value here.
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment