ZenMagick 0.9.10


zenmagick.store.admin.installation.patches\ZMFilePatch
installation\patches\ZMFilePatch.php at line 30

Class ZMFilePatch

ZMObject
└─ZMInstallationPatch
└─ZMFilePatch

public class ZMFilePatch
extends ZMInstallationPatch

Generic file patch.

Author:
DerManoMann

Fields inherited from zenmagick.store.admin.installation\ZMInstallationPatch
id_, messages_
Fields inherited from org.zenmagick.core\ZMObject
properties_
Method Summary
void

__construct(string id)

Create new patch.

array

getFileLines(string file)

Load the given file line by line.

string

getGroupId()

Get the patch group id.

boolean

isFilesFktOpen(array fktFilesCfg)

isOpen() check for function renaming.

boolean

patchFilesFkt(array fktFilesCfg)

Execute function renaming patch.

boolean

putFileLines(string file, array lines)

Write the given lines to file.

string

readFile(string file)

Read the given file.

boolean

undoFilesFkt(array fktFilesCfg)

Undo function renaming patch.

boolean

writeFile(string file, string contents)

Write the given contents to file.

Methods inherited from zenmagick.store.admin.installation\ZMInstallationPatch
__construct, canUndo, dependsOn, getGroupId, getId, getMessages, getPreconditionsMessage, isOpen, isReady, patch, undo
Methods inherited from org.zenmagick.core\ZMObject
__construct, attachMethod, get, getAttachedMethods, getProperties, getPropertyNames, set, singleton

Method Detail

installation\patches\ZMFilePatch.php at line 37

__construct

public void __construct(string id)

Create new patch.

Parameters:
id - Id of the patch.

installation\patches\ZMFilePatch.php at line 66

getFileLines

public array getFileLines(string file)

Load the given file line by line.

Parameters:
file - The filename.
Returns:
File contents as lines or null.

installation\patches\ZMFilePatch.php at line 55

getGroupId

public string getGroupId()

Get the patch group id.

Returns:
The patch group id.

installation\patches\ZMFilePatch.php at line 153

isFilesFktOpen

public boolean isFilesFktOpen(array fktFilesCfg)

isOpen() check for function renaming.

Parameters:
fktFilesCfg - The file / function name / function suffix mapping(s).
Returns:
true if any patches are open.

installation\patches\ZMFilePatch.php at line 181

patchFilesFkt

public boolean patchFilesFkt(array fktFilesCfg)

Execute function renaming patch.

Parameters:
fktFilesCfg - The file / function name / function suffix mapping(s).
Returns:
true if patching was successful, false if not.

installation\patches\ZMFilePatch.php at line 89

putFileLines

public boolean putFileLines(string file, array lines)

Write the given lines to file.

Parameters:
file - The filename.
lines - The lines to write.
Returns:
true if successful, false if not.

installation\patches\ZMFilePatch.php at line 114

readFile

public string readFile(string file)

Read the given file.

Parameters:
file - The filename.
Returns:
The file contents or null.

installation\patches\ZMFilePatch.php at line 222

undoFilesFkt

public boolean undoFilesFkt(array fktFilesCfg)

Undo function renaming patch.

Parameters:
fktFilesCfg - The file / function name / function suffix mapping(s).
Returns:
true if patching was successful, false if not.

installation\patches\ZMFilePatch.php at line 132

writeFile

public boolean writeFile(string file, string contents)

Write the given contents to file.

Parameters:
file - The filename.
contents - The file contents.
Returns:
true if successful, false if not.

ZenMagick 0.9.10