CorporationManagerContract
The Contract for the CorporationManager, defining the required methods.
Defines the contract for managing and interacting with LaravelNeuro Corporations. This interface allows mounting 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
Methods
- debug() : CorporationManagerContract
- Enables or disables debug mode for the mounted Corporation.
- disableHistory() : CorporationManagerContract
- Disables history logging for the current Corporation run.
- enableHistory() : CorporationManagerContract
- Enables history logging for the current Corporation run.
- getCorporationModel() : NetworkCorporation
- Retrieves the NetworkCorporation model associated with the mounted Corporation.
- mount() : CorporationManagerContract
- Mounts a Corporation by its ID or namespace.
- run() : NetworkProject
- Executes the Corporation’s state machine.
- task() : CorporationManagerContract
- Assigns a task to the currently mounted Corporation.
Methods
debug()
Enables or disables debug mode for the mounted Corporation.
public
debug([bool $debug = true ]) : CorporationManagerContract
Parameters
- $debug : bool = true
-
Set to true to enable debug mode, false to disable it.
Tags
Return values
CorporationManagerContractdisableHistory()
Disables history logging for the current Corporation run.
public
disableHistory() : CorporationManagerContract
Tags
Return values
CorporationManagerContractenableHistory()
Enables history logging for the current Corporation run.
public
enableHistory() : CorporationManagerContract
Tags
Return values
CorporationManagerContractgetCorporationModel()
Retrieves the NetworkCorporation model associated with the mounted Corporation.
public
getCorporationModel() : NetworkCorporation
Tags
Return values
NetworkCorporationmount()
Mounts a Corporation by its ID or namespace.
public
mount(int|string $corporation) : CorporationManagerContract
Parameters
- $corporation : int|string
-
The Corporation ID or namespace.
Tags
Return values
CorporationManagerContractrun()
Executes the Corporation’s state machine.
public
run() : NetworkProject
Tags
Return values
NetworkProject —The resulting NetworkProject instance containing the output.
task()
Assigns a task to the currently mounted Corporation.
public
task(string $task) : CorporationManagerContract
Parameters
- $task : string
-
The task description or input.