src/Neuron/Core/Stats.php
public function getFile ($orgFile, $default = array (), $race = null)
	{
		if (is_object ($race))
		{
			$race = $race->getName ();
		}
		
		if ($race != null)
		{
			$file = STATS_DIR . $this->folder . '/'. $race . '/' . $orgFile . '.ini';
		}

		else
		{
			$file = STATS_DIR . $this->folder . '/'. $orgFile . '.ini';
		}

		if (!isset ($this->files[$file]))
		{
			$this->loadFile ($file);
		}

		if (isset ($this->files[$file]) && is_array ($this->files[$file]))
		{
			return $this->files[$file];
		}

		else
		{
			// Return value
			if ($race != null)
			{
				return $this->getFile ($groep, $orgFile, $default);
			}

			else
			{
				return $default;
			}
		}
	}
public function getFile ($orgFile, $default = array (), $race = null)
	{
		if (is_object ($race))
		{
			$race = $race->getName ();
		}
		
		if ($race != null)
		{
			$file = STATS_DIR . $this->folder . '/'. $race . '/' . $orgFile . '.ini';
		}

		else
		{
			$file = STATS_DIR . $this->folder . '/'. $orgFile . '.ini';
		}

		if (!isset ($this->files[$file]))
		{
			$this->loadFile ($file);
		}

		if (isset ($this->files[$file]) && is_array ($this->files[$file]))
		{
			return $this->files[$file];
		}

		else
		{
			// Return value
			if ($race != null)
			{
				return $this->getFile ($groep, $orgFile, $default);
			}

			else
			{
				return $default;
			}
		}
	}
public function getFile ( $ orgFile , $ default = array ( ) , $ race = null ) { if ( is_object ( $ race ) ) { $ race = $ race -> getName ( ) ; } if ( $ race != null ) { $ file = STATS_DIR . $ this -> folder . '/' . $ race . '/' . $ orgFile . '.ini' ; } else { $ file = STATS_DIR . $ this -> folder . '/' . $ orgFile . '.ini' ; } if ( ! isset ( $ this -> files [ $ file ] ) ) { $ this -> loadFile ( $ file ) ; } if ( isset ( $ this -> files [ $ file ] ) && is_array ( $ this -> files [ $ file ] ) ) { return $ this -> files [ $ file ] ; } else { // Return value if ( $ race != null ) { return $ this -> getFile ( $ groep , $ orgFile , $ default ) ; } else { return $ default ; } } }
/*
Simply returns the whole file:
$return[$section][$id] = $value
/ * Simply returns the whole file : $return [ $section ] [ $id ] = $value