Overview

Namespaces

  • Budabot
    • Core
      • Modules
    • User
      • Modules
  • None
  • Tyrence
    • Modules

Classes

  • AccessManager
  • AdminManager
  • AOChat
  • AOChatPacket
  • AOChatQueue
  • AOExtMsg
  • AsyncHttp
  • AutoInject
  • BotRunner
  • Budabot
  • BuddylistManager
  • CacheManager
  • CacheResult
  • ClassLoader
  • ColorSettingHandler
  • CommandAlias
  • CommandManager
  • ConfigFile
  • DB
  • DBRow
  • EventLoop
  • EventManager
  • GuildChannelCommandReply
  • GuildManager
  • HelpManager
  • Http
  • HttpRequest
  • LegacyLogger
  • LimitsController
  • LoggerWrapper
  • MMDBParser
  • NumberSettingHandler
  • OptionsSettingHandler
  • PlayerHistory
  • PlayerHistoryManager
  • PlayerManager
  • Preferences
  • PrivateChannelCommandReply
  • PrivateMessageCommandReply
  • Registry
  • SettingHandler
  • SettingManager
  • SettingObject
  • SocketManager
  • SocketNotifier
  • SubcommandManager
  • Text
  • TextSettingHandler
  • Timer
  • TimerEvent
  • TimeSettingHandler
  • Util
  • xml

Interfaces

  • CommandReply

Exceptions

  • InvalidHttpRequest
  • SQLException
  • StopExecutionException

Functions

  • isWindows
  • Overview
  • Namespace
  • Class

Class ConfigFile

The ConfigFile class provides convenient interface for reading and saving config files located in conf-subdirectory.

Namespace: Budabot\Core
Located at ConfigFile.class.php
Methods summary
public
# __construct( $filePath )

Constructor method.

Constructor method.

$param string $filePath path to the config file

public
# getFilePath( )

Returns file path to the config file.

Returns file path to the config file.

public
# load( )

Loads the config file, creating the file if it doesn't exist yet.

Loads the config file, creating the file if it doesn't exist yet.

public
# save( )

Saves the config file, creating the file if it doesn't exist yet.

Saves the config file, creating the file if it doesn't exist yet.

public
# getVars( )

Returns the $vars variable's contents from the config file.

Returns the $vars variable's contents from the config file.

public
# getVar( string $name )

Returns var from the config file.

Returns var from the config file.

Parameters

$name
name of the var
public
# insertVars( mixed[] $vars )

Inserts the $vars array's contents. Any existing indexes are replaced with the new values.

Inserts the $vars array's contents. Any existing indexes are replaced with the new values.

Parameters

$vars
array of data to set
public
# setVar( string $name, mixed $value )

Sets var to the config file.

Sets var to the config file.

Parameters

$name
name of the var
$value
value of the var
private
# copyFromTemplateIfNeeded( )

Copies config.template.php to this config file if it doesn't exist yet.

Copies config.template.php to this config file if it doesn't exist yet.

Properties summary
private $filePath
#
private $vars
#
Budabot 4 Docs API documentation generated by ApiGen