Database
class Database
Constants
FILE_READ |
File read flag. |
FILE_WRITE |
File write flag. |
FILE_APPEND |
File append flag. |
Properties
protected array | $fileAccessMode | File access mode. | |
protected string | $name | Database name. | |
protected Config | $config | Config class. |
Methods
string
getName()
Get the database name.
setName(string $name)
Set the database name.
string
getPath()
Get the path to the database file.
openFile(int $mode)
Open the database file.
openTempFile()
Open a temporary file.
readFromFile()
Read lines from the database file.
appendToFile(string $line)
Append a line to the database file.
flushFile()
Flush the database file.
Details
at line 71
__construct(string $name, Config $config = null)
Constructor.
at line 85
string
getName()
Get the database name.
at line 97
setName(string $name)
Set the database name.
at line 108
Config
getConfig()
Get the config.
at line 118
setConfig(Config $config)
Set the config.
at line 128
string
getPath()
Get the path to the database file.
at line 142
protected SplFileObject
openFile(int $mode)
Open the database file.
at line 178
SplTempFileObject
openTempFile()
Open a temporary file.
at line 190
protected
closeFile(SplFileObject $file)
Close the database file.
at line 205
Generator
readFromFile()
Read lines from the database file.
at line 223
appendToFile(string $line)
Append a line to the database file.
at line 233
flushFile()
Flush the database file.
at line 244
writeTempToFile(SplTempFileObject $tmpFile)
Write temporary file contents to database file.