Amiro.CMS API Reference
Amiro.Ru / Manual
Loading search...

The AMI_UserSourceApp class

• Introduction

User Source Application service class. Provide drivers management functionality.

• Class synopsis

AMI_UserSourceApp implements AMI_iUserSourceAppService {
/* Properties */
// Inactive user set
public string $inactiveUserSet = 'inactive_user_set';
// Incorrect user set
public string $incorrectUserSet = 'incorrect_user_set';
// Template block name.
public string $tplBlockName = 'users_source_app';
// User specblock icons list set
public string $userSpecblockIconsListSet = 'user_specblock_icons_list_set';
// Cached driver icons
protected static array $aDriversIcons = array();
// INI Config array
protected array $aConfig = array();
// Associative array of driverId => driverName pair
protected array $aDriversIdList = array();
// Array of drivers names
protected array $aDriversList = array();
// Locales array
protected array $aLocale = array();
// Enabled/disabled flag
protected bool $bEnabled = true;
// Button item set name
protected string $buttonItemSet = 'button_item';
// Buttons list set name
protected string $buttonsListSet = 'buttons_list';
// INI Config file name
protected string $iniFileName = '_local/user_source_app.ini.php';
// Locales file name
protected string $localeFileName = 'templates/lang/user_source_app.lng';
// Template file name
protected string $tplFileName = 'templates/user_source_app.tpl';
/* Methods */
// Constructor.
public __construct ( ) returns AMI_UserSourceApp;
// Add driver into service.
public addDriver ( string $driverName ) returns void;
// Check for valid user E-mail.
public checkValidMail ( string $email ) returns bool;
// Dispatch custom driver action.
public dispatchDriverAction ( string $driverName, string $actionName ) returns mixed;
// Getting all drivers buttons as HTML.
public getButtons ( ) returns string;
// Create and return driver object.
public getDriver ( string $driverName ) returns AMI_iUserSourceAppDriver;
// Return specified driver icon as HTML.
public getDriverIcon ( int $driverName, [ $aScope = array() ] ) returns string;
// Return driver name by driver Id.
public getDriverNameById ( int $id ) returns string;
// Returns global template object.
public getTemplate ( ) returns AMI_iTemplate;
// Special function to correct show icon in cached users specblock.
public getUserSpecblockDriverIcon ( ) returns string;
}

• Class Details

Remote config file name stored as $iniFileName ('_local/user_source_app.ini.php' by default).
Tags:
since 5.12.0

• Class Properies

public string $inactiveUserSet

Inactive user set

public string $incorrectUserSet

Incorrect user set

public string $tplBlockName

Template block name.

public string $userSpecblockIconsListSet

User specblock icons list set

protected static array $aDriversIcons

Cached driver icons

protected array $aConfig

INI Config array

protected array $aDriversIdList

Associative array of driverId => driverName pair

protected array $aDriversList

Array of drivers names

protected array $aLocale

Locales array

protected bool $bEnabled

Enabled/disabled flag

protected string $buttonItemSet

Button item set name

protected string $buttonsListSet

Buttons list set name

protected string $iniFileName

INI Config file name

protected string $localeFileName

Locales file name

protected string $tplFileName

Template file name

• Class Methods

// Constructor.
public __construct ( ) returns AMI_UserSourceApp;
Reading all drivers resources from: 'user_source_app/drivers/',and initialize its.
// Add driver into service.
public addDriver ( string $driverName ) returns void;
  • string $driverName
    Driver name
// Check for valid user E-mail.
public checkValidMail ( string $email ) returns bool;
  • string $email
    E-mail
// Dispatch custom driver action.
public dispatchDriverAction ( string $driverName, string $actionName ) returns mixed;
  • string $driverName
    Driver name
  • string $actionName
    Action name
// Getting all drivers buttons as HTML.
public getButtons ( ) returns string;
// Create and return driver object.
public getDriver ( string $driverName ) returns AMI_iUserSourceAppDriver;
  • string $driverName
    Driver name
// Return specified driver icon as HTML.
public getDriverIcon ( int $driverName, [ $aScope = array() ] ) returns string;
  • int $driverName
    Driver name
  • array $aScope
    Template scope
// Return driver name by driver Id.
public getDriverNameById ( int $id ) returns string;
  • int $id
    Driver Id
// Returns global template object.
public getTemplate ( ) returns AMI_iTemplate;
// Special function to correct show icon in cached users specblock.
public getUserSpecblockDriverIcon ( ) returns string;