Magento 2 Documentation  2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
Public Member Functions | Protected Member Functions
AbstractAdapter Class Reference
Inheritance diagram for AbstractAdapter:
Zend_Translate_Adapter AdapterInterface Adapter

Public Member Functions

 isTranslated ($messageId, $original=false, $locale=null)
 
 setLocale ($locale)
 
 toString ()
 
- Public Member Functions inherited from Zend_Translate_Adapter
 __construct ($options=array())
 
 addTranslation ($options=array())
 
 setOptions (array $options=array())
 
 getOptions ($optionKey=null)
 
 getLocale ()
 
 setLocale ($locale)
 
 getList ()
 
 getMessageId ($message, $locale=null)
 
 getMessageIds ($locale=null)
 
 getMessages ($locale=null)
 
 isAvailable ($locale)
 
 translate ($messageId, $locale=null)
 
 plural ($singular, $plural, $number, $locale=null)
 
 _ ($messageId, $locale=null)
 
 isTranslated ($messageId, $original=false, $locale=null)
 
 toString ()
 
- Public Member Functions inherited from AdapterInterface
 translate ($messageId, $locale=null)
 
 __ ()
 

Protected Member Functions

 _loadTranslationData ($data, $locale, array $options=[])
 
- Protected Member Functions inherited from Zend_Translate_Adapter
 _loadTranslationData ($data, $locale, array $options=array())
 
 _log ($message, $locale)
 

Additional Inherited Members

- Static Public Member Functions inherited from Zend_Translate_Adapter
static getCache ()
 
static setCache (Zend_Cache_Core $cache)
 
static hasCache ()
 
static removeCache ()
 
static clearCache ($tag=null)
 
- Data Fields inherited from Zend_Translate_Adapter
const LOCALE_DIRECTORY = 'directory'
 
const LOCALE_FILENAME = 'filename'
 
- Protected Attributes inherited from Zend_Translate_Adapter
 $_options
 
 $_translate = array()
 
- Static Protected Attributes inherited from Zend_Translate_Adapter
static $_cache = null
 

Detailed Description

Definition at line 12 of file AbstractAdapter.php.

Member Function Documentation

◆ _loadTranslationData()

_loadTranslationData (   $data,
  $locale,
array  $options = [] 
)
protected

Load translation data

@SuppressWarnings(PHPMD.UnusedFormalParameter)

Parameters
mixed$data
string$locale
array$options(optional)
Returns
array

Definition at line 23 of file AbstractAdapter.php.

24  {
25  return [];
26  }

◆ isTranslated()

isTranslated (   $messageId,
  $original = false,
  $locale = null 
)

Is translation available.

Return false, as \Zend_Validate pass message into translator only when isTranslated is false

@SuppressWarnings(PHPMD.UnusedFormalParameter)

Parameters
string$messageId
bool$original
null$locale
Returns
false

Definition at line 39 of file AbstractAdapter.php.

40  {
41  return false;
42  }

◆ setLocale()

setLocale (   $locale)

Stub for setLocale functionality

@SuppressWarnings(PHPMD.UnusedFormalParameter)

Parameters
string$locale
Returns
$this

Definition at line 51 of file AbstractAdapter.php.

52  {
53  return $this;
54  }

◆ toString()

toString ( )

Returns the adapter name

Returns
string

Definition at line 61 of file AbstractAdapter.php.

62  {
63  return \Magento\Framework\Translate\Adapter::class;
64  }

The documentation for this class was generated from the following file: