eZPublishCommunityProject  2013.9
eZ\Publish\Core\Persistence\Legacy\Content\Language\MaskGenerator Class Reference

Language MaskGenerator. More...

Public Member Functions

 __construct (LanguageHandler $languageHandler)
 Creates a new Language MaskGenerator. More...
 
 extractLanguageCodesFromMask ($languageMask)
 Extracts Language codes contained in given $languageMask. More...
 
 extractLanguageIdsFromMask ($languageMask)
 Extracts every language Ids contained in $languageMask. More...
 
 generateLanguageIndicator ($languageCode, $alwaysAvailable)
 Generates a language indicator from $languageCode and $alwaysAvailable. More...
 
 generateLanguageMask (array $languages)
 Generates a language mask from the keys of $languages. More...
 
 isAlwaysAvailable ($languageMask)
 Checks if $languageMask contains the alwaysAvailable bit field. More...
 
 isLanguageAlwaysAvailable ($language, array $languages)
 Checks if $language is always available in $languages;. More...
 
 removeAlwaysAvailableFlag ($languageId)
 Removes the alwaysAvailable flag from $languageId and returns cleaned up $languageId. More...
 

Protected Attributes

 $languageHandler
 

Detailed Description

Constructor & Destructor Documentation

eZ\Publish\Core\Persistence\Legacy\Content\Language\MaskGenerator::__construct ( LanguageHandler  $languageHandler)

Creates a new Language MaskGenerator.

Parameters
\eZ\Publish\SPI\Persistence\Content\Language\Handler$languageHandler

Member Function Documentation

eZ\Publish\Core\Persistence\Legacy\Content\Language\MaskGenerator::extractLanguageCodesFromMask (   $languageMask)

Extracts Language codes contained in given $languageMask.

Parameters
int$languageMask
Returns
array
eZ\Publish\Core\Persistence\Legacy\Content\Language\MaskGenerator::extractLanguageIdsFromMask (   $languageMask)

Extracts every language Ids contained in $languageMask.

Parameters
int$languageMask
Returns
array Array of language Id

Referenced by eZ\Publish\Core\Persistence\Legacy\Content\Language\MaskGenerator\extractLanguageCodesFromMask().

eZ\Publish\Core\Persistence\Legacy\Content\Language\MaskGenerator::generateLanguageIndicator (   $languageCode,
  $alwaysAvailable 
)

Generates a language indicator from $languageCode and $alwaysAvailable.

Parameters
string$languageCode
boolean$alwaysAvailable
Returns
int
eZ\Publish\Core\Persistence\Legacy\Content\Language\MaskGenerator::generateLanguageMask ( array  $languages)

Generates a language mask from the keys of $languages.

Parameters
array$languages
Returns
int
eZ\Publish\Core\Persistence\Legacy\Content\Language\MaskGenerator::isAlwaysAvailable (   $languageMask)

Checks if $languageMask contains the alwaysAvailable bit field.

Parameters
int$languageMask
Returns
boolean
eZ\Publish\Core\Persistence\Legacy\Content\Language\MaskGenerator::isLanguageAlwaysAvailable (   $language,
array  $languages 
)

Checks if $language is always available in $languages;.

Parameters
string$language
array$languages
Returns
boolean
eZ\Publish\Core\Persistence\Legacy\Content\Language\MaskGenerator::removeAlwaysAvailableFlag (   $languageId)

Removes the alwaysAvailable flag from $languageId and returns cleaned up $languageId.

Parameters
int$languageId
Returns
int

Member Data Documentation

eZ\Publish\Core\Persistence\Legacy\Content\Language\MaskGenerator::$languageHandler
protected

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