protected function load(array $defaults)
	{
		if ( file_exists($this->filename) ) {
			$stored_settings = json_decode(file_get_contents($this->filename), true);
			$new_defaults = array_diff_key($defaults, $stored_settings);

			if ( $new_defaults ) {
				$this->settings = array_merge($stored_settings, $new_defaults);
				$this->store();
			}
			else {
				$this->settings = $stored_settings;
			}

			return;
		}

		$this->settings = $defaults;
		$this->store();
	}
protected function load(array $defaults)
	{
		if ( file_exists($this->filename) ) {
			$stored_settings = json_decode(file_get_contents($this->filename), true);
			$new_defaults = array_diff_key($defaults, $stored_settings);

			if ( $new_defaults ) {
				$this->settings = array_merge($stored_settings, $new_defaults);
				$this->store();
			}
			else {
				$this->settings = $stored_settings;
			}

			return;
		}

		$this->settings = $defaults;
		$this->store();
	}
protected function load ( array $ defaults ) { if ( file_exists ( $ this -> filename ) ) { $ stored_settings = json_decode ( file_get_contents ( $ this -> filename ) , true ) ; $ new_defaults = array_diff_key ( $ defaults , $ stored_settings ) ; if ( $ new_defaults ) { $ this -> settings = array_merge ( $ stored_settings , $ new_defaults ) ; $ this -> store ( ) ; } else { $ this -> settings = $ stored_settings ; } return ; } $ this -> settings = $ defaults ; $ this -> store ( ) ; }
Loads config contents from disk.

@param array $defaults Defaults.

@return void
Loads config contents from disk .