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

The AMI_UserSourceAppDriver class

• Introduction

User source apllication driver middle layer.

• Class synopsis

AMI_UserSourceAppDriver implements AMI_iUserSourceAppDriver {
/* Properties */
// Driver id numeric (unique).
public void $driverId;
// Driver name.
public void $driverName;
// Entry point URL.
public void $entryPoint = 'ami_service.php';
// Driver's settings array.
protected array $aConfig;
// User Source application object.
protected array $oService;
/* Methods */
// Constructior.
public __construct ( AMI_iUserSourceAppService $oService, [ $aConfig = array() ] ) returns AMI_UserSourceAppDriver;
// Dispatch verify login action.
public dispatchVerify ( [ $aData = array() ] ) returns bool;
// Return HTML button.
public getButton ( [ $aScope = array() ] ) returns string;
// Returns current driver ID.
public getDriverId ( ) returns int;
// Return driver name.
public getDriverName ( ) returns string;
// Return entry point script name.
public getEntryPoint ( ) returns string;
// Returns driver icon.
public getIcon ( [ $aScope = array() ] ) returns string;
// Returns short string hash.
public getShortHash ( string $string ) returns string;
}

• Class Details

Contains common drivers functionality.
* To configure current driver:
  • Edit "/_local/users_source_app.ini.php";
  • Fill up all required fields;
  • Enable it.
To create a new one:
  • Create new class extends AMI_UserSourceAppDriver;
  • Generate new unique driverId value (more than 10000);
  • Generate new unique driverName;
  • Add you new driver into resource mapping in '/user_source_app/drivers/';
  • Create new options in '/_local/users_source_app.ini.php' (optional);
  • Create method getButton witch returns HTML driver icon;
  • Modify verifyLogin method according to your requirements.
Tags:
abstract
since 5.12.0

• Class Properies

public void $driverId

Driver id numeric (unique).

ID less than 10000 restricted.

public void $driverName

Driver name.

public void $entryPoint

Entry point URL.

protected array $aConfig

Driver's settings array.

protected array $oService

User Source application object.

• Class Methods

// Constructior.
public __construct ( AMI_iUserSourceAppService $oService, [ $aConfig = array() ] ) returns AMI_UserSourceAppDriver;
// Dispatch verify login action.
public dispatchVerify ( [ $aData = array() ] ) returns bool;
  • array $aData
    Array. Required keys: 'login'.
// Return HTML button.
public getButton ( [ $aScope = array() ] ) returns string;
  • array $aScope
    Template scope array.
// Returns current driver ID.
public getDriverId ( ) returns int;
// Return driver name.
public getDriverName ( ) returns string;
// Return entry point script name.
public getEntryPoint ( ) returns string;
// Returns driver icon.
public getIcon ( [ $aScope = array() ] ) returns string;
  • array $aScope
    Template scope
// Returns short string hash.
public getShortHash ( string $string ) returns string;
  • string $string
    Source string