CorporationManager implements CorporationManagerContract
The CoporationManager provides the methods exposed by the Corporation Facade.
Provides a mount method to mount a Corporation by its ID or namespace, configuring tasks, enabling/disabling debugging, toggling history logging, and executing the Corporation’s state machine.
Table of Contents
Interfaces
- CorporationManagerContract
- The Contract for the CorporationManager, defining the required methods.
Properties
- $corporationInstance : Corporation
- The injected Corporation instance available via the Corporation Facade.
- $corporationModel : NetworkCorporation
- The injected NetworkCorporation instance available via the Corporation Facade.
Methods
- debug() : CorporationManagerContract
- Enables or disables debug mode on the corporation.
- disableHistory() : CorporationManagerContract
- Disables history logging for the corporation.
- enableHistory() : CorporationManagerContract
- Enables history logging for the corporation.
- getCorporationModel() : NetworkCorporation
- Retrieves the NetworkCorporation model of the mounted corporation.
- mount() : CorporationManagerContract
- Mounts a corporation instance using either an ID or a Namespace.
- run() : NetworkProject
- Runs the mounted corporation and returns the resulting NetworkProject.
- task() : CorporationManagerContract
- Sets the task for the mounted corporation.
Properties
$corporationInstance
The injected Corporation instance available via the Corporation Facade.
protected
Corporation
$corporationInstance
$corporationModel
The injected NetworkCorporation instance available via the Corporation Facade.
protected
NetworkCorporation
$corporationModel
Methods
debug()
Enables or disables debug mode on the corporation.
public
debug([bool $debug = true ]) : CorporationManagerContract
Parameters
- $debug : bool = true
Return values
CorporationManagerContractdisableHistory()
Disables history logging for the corporation.
public
disableHistory() : CorporationManagerContract
Return values
CorporationManagerContractenableHistory()
Enables history logging for the corporation.
public
enableHistory() : CorporationManagerContract
Return values
CorporationManagerContractgetCorporationModel()
Retrieves the NetworkCorporation model of the mounted corporation.
public
getCorporationModel() : NetworkCorporation
Return values
NetworkCorporationmount()
Mounts a corporation instance using either an ID or a Namespace.
public
mount(int|string $corporation) : CorporationManagerContract
Parameters
- $corporation : int|string
Tags
Return values
CorporationManagerContractrun()
Runs the mounted corporation and returns the resulting NetworkProject.
public
run() : NetworkProject
Return values
NetworkProjecttask()
Sets the task for the mounted corporation.
public
task(string $task) : CorporationManagerContract
Parameters
- $task : string