PHP Class Pagekit\Installer\Package\PackageScripts

Show file Open project: pagekit/pagekit Class Usage Examples

Protected Properties

Property Type Description
$current string
$file string

Public Methods

Method Description
__construct ( string $file, string $current = null ) Constructor.
disable ( ) Runs the script's disable hook.
enable ( ) Runs the script's enable hook.
hasUpdates ( ) Checks for script updates.
install ( ) Runs the script's install hook.
uninstall ( ) Runs the script's uninstall hook.
update ( ) Runs the script's update hooks.

Protected Methods

Method Description
get ( string $name ) : array
getUpdates ( ) : callable[]
load ( ) : array
run ( array | callable $scripts )

Method Details

__construct() public method

Constructor.
public __construct ( string $file, string $current = null )
$file string
$current string

disable() public method

Runs the script's disable hook.
public disable ( )

enable() public method

Runs the script's enable hook.
public enable ( )

get() protected method

protected get ( string $name ) : array
$name string
return array

getUpdates() protected method

protected getUpdates ( ) : callable[]
return callable[]

hasUpdates() public method

Checks for script updates.
public hasUpdates ( )

install() public method

Runs the script's install hook.
public install ( )

load() protected method

protected load ( ) : array
return array

run() protected method

protected run ( array | callable $scripts )
$scripts array | callable

uninstall() public method

Runs the script's uninstall hook.
public uninstall ( )

update() public method

Runs the script's update hooks.
public update ( )

Property Details

$current protected property

protected string $current
return string

$file protected property

protected string $file
return string