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

The AMI_Hyper_Meta class

• Introduction

Hypermodule metadata.

• Class synopsis

AMI_Hyper_Meta {
/* Properties */
// Array of hypermodule meta data
protected array $aData;
// Array having locales as keys and meta data as values
protected array $aInfo;
// Array having locales as keys and titles as values
protected array $aTitle;
// Flag specifying that hypermodule configs can have only one instance per config
protected bool $isSingleInstance = FALSE;
// Version
protected string $version = '';
/* Methods */
// Retrurns allowed installation/uninstallation modes.
public getAllowedModes ( [ string $type = '' ] ) returns array;
// Returns hypermodule meta data.
public getData ( [ string $key = null ] ) returns string;
// Returns hypermodule info.
public getInfo ( string $locale ) returns string;
// Returns hypermodule / config title.
public getTitle ( string $locale ) returns string;
// Returns hypermodule version.
public getVersion ( ) returns string;
// Returns hypermodule instantiate flag value.
public isSingleInstance ( ) returns bool;
// Set hypermodule meta data.
public setData ( string $key, mixed $value ) returns void;
}
Tags:
abstract
since 6.0.2

• Class Properies

protected array $aData

Array of hypermodule meta data

protected array $aInfo

Array having locales as keys and meta data as values

protected array $aTitle

Array having locales as keys and titles as values

protected bool $isSingleInstance

Flag specifying that hypermodule configs can have only one instance per config

protected string $version

Version

• Class Methods

// Retrurns allowed installation/uninstallation modes.
public getAllowedModes ( [ string $type = '' ] ) returns array;
  • string $type
    Possible values: 'install' / 'uninstall' / '' (all)

Overridden in child classes as: AmiFake_AmiroPayDrvExample_Meta::getAllowedModes().

  Example:
  •  // AMI_Hyper_Meta::getAllowedModes():
  •  
  •  public function getAllowedModes($type ''){
  •      $aModes array(
  •          'install' => array(
  •              'common'    => AMI_iTx_Cmd::MODE_COMMON,
  •              'append'    => AMI_iTx_Cmd::MODE_APPEND,
  •              'overwrite' => AMI_iTx_Cmd::MODE_OVERWRITE
  •          ),
  •          'uninstall' => array(
  •              'soft'  => AMI_iTx_Cmd::MODE_SOFT,
  •              'purge' => AMI_iTx_Cmd::MODE_PURGE
  •          )
  •      );
  •      return
  •          $type === '' $aModes $aModes[$type];
  •  }
  •  
  •  
  •  // AMI_Hyper_Meta child context:
  •  
  •  public function getAllowedModes($type ''){
  •      $aModes parent::getAllowedModes();
  •      // I. e. common payment driver doesn't support soft uninstallation.
  •      unset($aModes['uninstall']['soft']);
  •      return
  •          $type === '' $aModes $aModes[$type];
  •  }
Tags:
since 6.0.2
// Returns hypermodule meta data.
public getData ( [ string $key = null ] ) returns string;
  • string $key
    Key name
// Returns hypermodule info.
public getInfo ( string $locale ) returns string;
  • string $locale
    Locale
// Returns hypermodule / config title.
public getTitle ( string $locale ) returns string;
  • string $locale
    Locale
// Returns hypermodule version.
public getVersion ( ) returns string;
// Returns hypermodule instantiate flag value.
public isSingleInstance ( ) returns bool;
// Set hypermodule meta data.
public setData ( string $key, mixed $value ) returns void;
  • string $key
    Key name
  • mixed $value
    Value