public function all() { if ($this->cache != NULL) { return $this->cache; } if ($_SESSION['standingDataSource'] == 'Remote Server') { $xmlStr = file_get_contents('http://nfl.jlparry.com/standings'); $this->cache = League::translateXML($xmlStr); } else { $this->cache = parent::all(); } return $this->cache; }