Amiro.CMS API Reference
Amiro.Ru
/
Manual
Packages:
DB
Debug
Driver_PaymentSystem
Environment
Library
Module
ModuleComponent
Package
Plugin
Plugin_AJAXResponder
Plugin_Sample
Service
Template
TxCommand
TxService
Hyper_AmiCatalog
Hyper_AmiClean
Hyper_AmiEshopShipping
Hyper_AmiExt
Hyper_AmiFiles
Hyper_AmiMultifeeds
Hyper_AmiSearch
Hyper_AmiUsers
Config_AmiCatalog_Items
Config_AmiClean_AmiNewsList
Config_AmiClean_AmiSample
Config_AmiClean_EshopOrder
Config_AmiClean_Sape
Config_AmiClean_Trustlink
Config_AmiClean_Webservice
Config_AmiEshopShipping_Fields
Config_AmiEshopShipping_Methods
Config_AmiEshopShipping_Types
Config_AmiFake_AmiroPayDrvExample
Config_AmiFiles_Files
Config_AmiMultifeeds_Articles
Config_AmiMultifeeds_Blog
Config_AmiMultifeeds_FAQ
Config_AmiMultifeeds_News
Config_AmiMultifeeds_Photoalbum
Config_AmiMultifeeds_PhotoGallery
Config_AmiMultifeeds_Stickers
Config_AmiUsers_Users
Module_Catalog
Module_Pages
Module_Sample
Module_SearchHistory
Interfaces:
AMI_iCaptcha
AMI_iCaptchaImage
AMI_iUserSourceAppDriver
AMI_iUserSourceAppService
Controller
AMI_iStorage
Classes:
AMI
AMI_BackgroundProcess
AMI_Cache
AMI_Captcha
AMI_CaptchaImage
AMI_Event
AMI_Exception
AMI_ExternalAuthDriver
AMI_HTMLResponse
AMI_HTTPRequest
AMI_HTTPResponse
AMI_Mail
AMI_MailQueue
AMI_PageManager
AMI_Response
AMI_Service
AMI_UserSourceApp
AMI_UserSourceAppDriver
Amiro_UserSourceAppDriver
Facebook_UserSourceAppDriver
Loginza_UserSourceAppDriver
Twitter_UserSourceAppDriver
VBulletin_ExternalAuthDriver
VKontakte_UserSourceAppDriver
cstEshopDatasets
Controller
AMI_Storage_FS
AMI_Storage_Template
Files:
v5_events.php
VBulletin_ExternalAuthDriver.php
Loading search...
The AMI_BackgroundProcess class
• Introduction
Class AMI_BackgroundProcess.
• Class synopsis
AMI_BackgroundProcess
{
/* Properties */
// Instance
protected
static
AMI_BackgroundProcess
$oInstance
;
/* Methods */
// Constructor.
public
__construct
( ) returns
AMI_BackgroundProcess
;
// Register background handler.
public
registerHandler
(
string
$handler
) returns
void
;
// Unregister background handler.
public
unregisterHandler
(
string
$handler
) returns
void
;
}
• Class Details
Allows to manage "background" processes.
Example:
$AMI_ENV_SETTINGS
=
array
(
'mode'
=>
'full'
,
'disable_cache'
=>
true
)
;
require
'ami_env.php'
;
$oResponse
=
AMI
::
getSingleton
(
'response'
)
;
$oResponse
->
start
(
)
;
// Create AMI_BackgroundProcess object
$oBackgroundProcess
=
new
AMI_BackgroundProcess
(
)
;
// Add background process into the queue
// The method "process" of class "User_BackgroundProcess" will be performed and should exist
$oBackgroundProcess
->
registerHandler
(
"User_BackgroundProcess::process"
)
;
$oResponse
->
write
(
'The background process was added into the queue.'
)
;
$oResponse
->
send
(
)
;
Tags:
since
6.0.6
• Class Properies
protected
static
AMI_BackgroundProcess
$oInstance
Instance
• Class Methods
// Constructor.
public
__construct
( ) returns
AMI_BackgroundProcess
;
// Register background handler.
public
registerHandler
(
string
$handler
) returns
void
;
string
$handler
Handler name like "className::methodName".
// Unregister background handler.
public
unregisterHandler
(
string
$handler
) returns
void
;
string
$handler
Handler name like "className::methodName".