PHP Class Composition

Inheritance: extends REST_Controller
Exibir arquivo Open project: bamarni/composition Class Usage Examples

Public Methods

Method Description
has ( type $packageName, type $prettyString = '*' ) : boolean Search for a given package version.
isUnix ( ) : boolean Wether or not the script is running on a Unix platform.
isWindows ( ) : boolean Wether or not the script is running on a Windows platform.
setRootDir ( type $rootDir ) Allow to manually set the project root dir.

Private Methods

Method Description
getPlatform ( )

Method Details

has() public static method

Usage examples : Composition::has('php', '5.3.*') // PHP version Composition::has('ext-memcache') // PHP extension Composition::has('vendor/package', '>2.1') // Package version
public static has ( type $packageName, type $prettyString = '*' ) : boolean
$packageName type The package name
$prettyString type An optional version constraint
return boolean Wether or not the package has been found.

isUnix() public static method

Wether or not the script is running on a Unix platform.
public static isUnix ( ) : boolean
return boolean

isWindows() public static method

Wether or not the script is running on a Windows platform.
public static isWindows ( ) : boolean
return boolean

setRootDir() public static method

Allow to manually set the project root dir.
public static setRootDir ( type $rootDir )
$rootDir type