Documentation

ApplicationPhp
in package
implements Wrapper, Stringable Uses WrapperTrait

Wrapper for the Application.php/Bundle.php files.

Tags
category

Horde

author

Jan Schneider jan@horde.org

license

http://www.horde.org/licenses/lgpl21 LGPL 2.1

Interfaces, Classes, Traits and Enums

Wrapper
Interface for the component file wrappers.
Stringable

Table of Contents

APPLICATION_REGEXP  = '/public \\$version = \'([^\']*)\';/'
Regular expression to find application version.
BUNDLE_REGEXP  = '/const VERSION = \'([^\']*)\';/'
Regular expression to find bundle version.
$_contents  : string
The file contents.
$_file  : string
Full path to the file.
__construct()  : mixed
Constructor.
__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.
getVersion()  : string
Returns the current version.
isBundle()  : bool
Returns whether this is a wrapper around a lib/Bundle.php.
save()  : mixed
Saves this object to the file.
setVersion()  : void
Sets the current version.

Constants

APPLICATION_REGEXP

Regular expression to find application version.

public final mixed APPLICATION_REGEXP = '/public \\$version = \'([^\']*)\';/'

BUNDLE_REGEXP

Regular expression to find bundle version.

public final mixed BUNDLE_REGEXP = '/const VERSION = \'([^\']*)\';/'

Properties

Methods

__construct()

Constructor.

public __construct(string $baseDir) : mixed
Parameters
$baseDir : string

Directory with lib/(Application|Bundle).php.

Return values
mixed

__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
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.

getVersion()

Returns the current version.

public getVersion() : string
Return values
string

The current version.

isBundle()

Returns whether this is a wrapper around a lib/Bundle.php.

public isBundle() : bool
Return values
bool

True if this is a Bundle.php wrapper.

save()

Saves this object to the file.

public save() : mixed
Return values
mixed

setVersion()

Sets the current version.

public setVersion(string $version) : void
Parameters
$version : string

The new version.

Return values
void

Search results