EC-CUBE4 APIドキュメント

SystemService implements EventSubscriberInterface

Table of Contents

AUTO_MAINTENANCE 'auto_maintenance'
AUTO_MAINTENANCE_UPDATE 'auto_maintenance_update'
$disableMaintenanceAfterResponse メンテナンスモードを無効にする場合はtrue bool
$maintenanceMode メンテナンスモードの識別子 string
$entityManager EntityManagerInterface
$container ContainerInterface
__construct() SystemService constructor. mixed
getDbversion() get DB version string
canSetMemoryLimit() Try to set new values memory_limit | return true bool
getMemoryLimit() Get memory_limit | Megabyte float|int
switchMaintenance()  メンテナンスモードを切り替える mixed
disableMaintenanceEvent() KernelEvents::TERMINATE で設定されるEvent mixed
disableMaintenance() メンテナンスモードを解除する mixed
isMaintenanceMode()  メンテナンスモードの状態を判定する bool
getSubscribedEvents() {@inheritdoc} mixed

Constants

AUTO_MAINTENANCE

public mixed $AUTO_MAINTENANCE = 'auto_maintenance'

AUTO_MAINTENANCE_UPDATE

public mixed $AUTO_MAINTENANCE_UPDATE = 'auto_maintenance_update'

Properties

$disableMaintenanceAfterResponse

メンテナンスモードを無効にする場合はtrue

private bool $disableMaintenanceAfterResponse = false

$maintenanceMode

メンテナンスモードの識別子

private string $maintenanceMode = null

$entityManager

protected EntityManagerInterface $entityManager

Methods

__construct()

SystemService constructor.

public __construct( $entityManager : EntityManagerInterface , $container : ContainerInterface ) : mixed
Parameters
$entityManager : EntityManagerInterface
$container : ContainerInterface
Return values
mixed

getDbversion()

get DB version

public getDbversion( ) : string
Return values
string

canSetMemoryLimit()

Try to set new values memory_limit | return true

public canSetMemoryLimit( $memory : string ) : bool
Parameters
$memory : string

| EX: 1536M

Return values
bool

getMemoryLimit()

Get memory_limit | Megabyte

public getMemoryLimit( ) : float|int
Return values
float|int

switchMaintenance()

 メンテナンスモードを切り替える

public switchMaintenance( [ $isEnable : bool = false ] [, $mode : string = self::AUTO_MAINTENANCE ] ) : mixed
  • $isEnable = true の場合, $mode の文字列が記載された .maintenance ファイルを生成する
  • $isEnable = false の場合, $mode の文字列が記載された .maintenance ファイルを削除する
Parameters
$isEnable : bool = false
$mode : string = self::AUTO_MAINTENANCE
Return values
mixed

disableMaintenanceEvent()

KernelEvents::TERMINATE で設定されるEvent

public disableMaintenanceEvent( $event : PostResponseEvent ) : mixed
Parameters
$event : PostResponseEvent
Return values
mixed

disableMaintenance()

メンテナンスモードを解除する

public disableMaintenance( [ $mode : string = self::AUTO_MAINTENANCE ] ) : mixed

KernelEvents::TERMINATE で解除のEventを設定し、メンテナンスモードを解除する

Parameters
$mode : string = self::AUTO_MAINTENANCE
Return values
mixed

isMaintenanceMode()

 メンテナンスモードの状態を判定する

public isMaintenanceMode( ) : bool
Return values
bool

getSubscribedEvents()

{@inheritdoc}

public static getSubscribedEvents( ) : mixed
Return values
mixed

Search results