Property | Type | Description | |
---|---|---|---|
$dirPermissions | integer | Create new folders with this privileges. | |
$updateScriptName | string | Update script filename. |
Property | Type | Description | |
---|---|---|---|
$_currentVersion | vierbergenlars\SemVer\version | Current version. | |
$_updateFile | string | Version filename on the server. | |
$_updateUrl | string | Url to the update folder on the server. |
Method | Description | |
---|---|---|
__construct ( string $tempDir = null, string $installDir = null, integer $maxExecutionTime = 60 ) | Create new instance | |
addLogHandler ( Monolog\Handler\HandlerInterface $handler ) | Add a new logging handler. | |
addTrailingSlash ( string $dir ) : string | Add slash at the end of the path. | |
checkUpdate ( ) : integer | boolean | Check for a new version | |
getLatestVersion ( ) : vierbergenlars\SemVer\version | Get the name of the latest version. | |
getSimulationResults ( ) : array | Get the results of the last simulation. | |
getVersionsToUpdate ( ) : array | Get an array of versions which will be installed. | |
newVersionAvailable ( ) : boolean | Check if a new version is available. | |
setBasicAuth ( $username, $password ) | Set authentication | |
setBranch ( $branch ) | Set the update branch. | |
setCache ( Desarrolla2\Cache\Adapter\AdapterInterface $adapter, integer $ttl = 3600 ) | Set the cache component. | |
setCurrentVersion ( string $currentVersion ) : boolean | Set the version of the current installed software. | |
setInstallDir ( string $dir ) | Set the install directory. | |
setTempDir ( string $dir ) | Set the temporary download directory. | |
setUpdateFile ( string $updateFile ) | Set the update filename. | |
setUpdateUrl ( string $updateUrl ) | Set the update filename. | |
update ( boolean $simulateInstall = true, boolean $deleteDownload = true ) : mixed | Update to the latest version |
Method | Description | |
---|---|---|
_downloadUpdate ( string $updateUrl, string $updateFile ) : boolean | Download the update | |
_install ( string $updateFile, boolean $simulateInstall, $version ) : boolean | Install update. | |
_simulateInstall ( string $updateFile ) : boolean | Simulate update process. |
Method | Description | |
---|---|---|
_removeDir ( string $dir ) : void | Remove directory recursively. | |
_useBasicAuth ( ) : null | resource | Set authentication in update method of users and password exist |
protected _simulateInstall ( string $updateFile ) : boolean | ||
$updateFile | string | |
return | boolean |
public addLogHandler ( Monolog\Handler\HandlerInterface $handler ) | ||
$handler | Monolog\Handler\HandlerInterface | See https://github.com/Seldaek/monolog |
public addTrailingSlash ( string $dir ) : string | ||
$dir | string | |
return | string |
public checkUpdate ( ) : integer | boolean | ||
return | integer | boolean | true: New version is available false: Error while checking for update int: Status code (i.e. AutoUpdate::NO_UPDATE_AVAILABLE) |
public getLatestVersion ( ) : vierbergenlars\SemVer\version | ||
return | vierbergenlars\SemVer\version |
public getSimulationResults ( ) : array | ||
return | array |
public getVersionsToUpdate ( ) : array | ||
return | array |
public newVersionAvailable ( ) : boolean | ||
return | boolean |
public setBasicAuth ( $username, $password ) | ||
$username | ||
$password |
public setCurrentVersion ( string $currentVersion ) : boolean | ||
$currentVersion | string | |
return | boolean |
public setInstallDir ( string $dir ) | ||
$dir | string |
public setTempDir ( string $dir ) | ||
$dir | string |
public setUpdateFile ( string $updateFile ) | ||
$updateFile | string |
public setUpdateUrl ( string $updateUrl ) | ||
$updateUrl | string |
protected version,vierbergenlars\SemVer $_currentVersion | ||
return | vierbergenlars\SemVer\version |
protected string $_updateFile | ||
return | string |
protected string $_updateUrl | ||
return | string |
public int $dirPermissions | ||
return | integer |
public string $updateScriptName | ||
return | string |