Wrapper
in
Interface for the component file wrappers.
Tags
Table of Contents
- __toString() : string
- Returns the file contents.
- diff() : string
- Returns a diff between the saved and the current version of the file.
- exists() : bool
- Returns whether the file exists.
- getFileName() : string
- Returns the file name.
- getFullPath() : string
- Returns the full path to the file.
- getLocalPath() : string
- Returns the local path to the file inside the package.
- save() : mixed
- Saves this object to the file.
Methods
__toString()
Returns the file contents.
public
__toString() : string
Return values
string —diff()
Returns a diff between the saved and the current version of the file.
public
diff([Wrapper $wrapper = null ]) : string
Parameters
- $wrapper : Wrapper = null
-
Use this instead of the saved version.
Return values
string —File diff.
exists()
Returns whether the file exists.
public
exists() : bool
Return values
bool —True if the file exists.
getFileName()
Returns the file name.
public
getFileName() : string
Return values
string —The file name.
getFullPath()
Returns the full path to the file.
public
getFullPath() : string
Return values
string —Path to the file.
getLocalPath()
Returns the local path to the file inside the package.
public
getLocalPath(string $dir) : string
Parameters
- $dir : string
-
The package directory.
Return values
string —Path to the file.
save()
Saves this object to the file.
public
save() : mixed