public static function createFromFile($path, array $options = []) {
		// Config's type resolve
		if (isset($options[self::OPTION_TYPE])) {
			$type = (string) $options[self::OPTION_TYPE];
			unset($options[self::OPTION_TYPE]);
		} else {
			$type = pathinfo($path, PATHINFO_EXTENSION);
		}
		
		return self::createFromSource(self::readFile($path), $type, $options);
	}
public static function createFromFile($path, array $options = []) {
		// Config's type resolve
		if (isset($options[self::OPTION_TYPE])) {
			$type = (string) $options[self::OPTION_TYPE];
			unset($options[self::OPTION_TYPE]);
		} else {
			$type = pathinfo($path, PATHINFO_EXTENSION);
		}
		
		return self::createFromSource(self::readFile($path), $type, $options);
	}
public static function createFromFile ( $ path , array $ options = [ ] ) { // Config's type resolve if ( isset ( $ options [ self :: OPTION_TYPE ] ) ) { $ type = ( string ) $ options [ self :: OPTION_TYPE ] ; unset ( $ options [ self :: OPTION_TYPE ] ) ; } else { $ type = pathinfo ( $ path , PATHINFO_EXTENSION ) ; } return self :: createFromSource ( self :: readFile ( $ path ) , $ type , $ options ) ; }
Create a config from the file

@param string $path    Path of a config
@param bool   $readOnly Created config must be locked to a read only
@param array  $options Options for a reader

@return ConfigInterface
Create a config from the file