eZPublishCommunityProject  2012.12
eZ\Publish\Core\Persistence\Legacy\Content\Language\Handler Class Reference

Language Handler. More...

+ Inheritance diagram for eZ\Publish\Core\Persistence\Legacy\Content\Language\Handler:
+ Collaboration diagram for eZ\Publish\Core\Persistence\Legacy\Content\Language\Handler:

Public Member Functions

 __construct (Gateway $languageGateway, Mapper $languageMapper)
 Creates a new Language Handler. More...
 
 create (CreateStruct $struct)
 Create a new language. More...
 
 delete ($id)
 Delete a language. More...
 
 load ($id)
 Get language by id. More...
 
 loadAll ()
 Get all languages. More...
 
 loadByLanguageCode ($languageCode)
 Get language by Language Code (eg: eng-GB) More...
 
 update (Language $language)
 Update language. More...
 

Protected Attributes

 $languageGateway
 
 $languageMapper
 

Detailed Description

Constructor & Destructor Documentation

eZ\Publish\Core\Persistence\Legacy\Content\Language\Handler::__construct ( Gateway  $languageGateway,
Mapper  $languageMapper 
)

Creates a new Language Handler.

Parameters
\eZ\Publish\Core\Persistence\Legacy\Content\Language\Gateway$languageGateway
\eZ\Publish\Core\Persistence\Legacy\Content\Language\Mapper$languageMapper

Member Function Documentation

eZ\Publish\Core\Persistence\Legacy\Content\Language\Handler::create ( CreateStruct  $struct)

Create a new language.

Parameters
\eZ\Publish\SPI\Persistence\Content\Language\CreateStruct$struct
Returns

Implements eZ\Publish\SPI\Persistence\Content\Language\Handler.

eZ\Publish\Core\Persistence\Legacy\Content\Language\Handler::delete (   $id)

Delete a language.

Parameters
mixed$id
Exceptions
LogicExceptionIf language could not be deleted

Implements eZ\Publish\SPI\Persistence\Content\Language\Handler.

eZ\Publish\Core\Persistence\Legacy\Content\Language\Handler::load (   $id)

Get language by id.

Parameters
mixed$id
Exceptions
\eZ\Publish\API\Repository\Exceptions\NotFoundExceptionIf language could not be found by $id
Returns

Implements eZ\Publish\SPI\Persistence\Content\Language\Handler.

eZ\Publish\Core\Persistence\Legacy\Content\Language\Handler::loadAll ( )

Get all languages.

Returns
[]

Implements eZ\Publish\SPI\Persistence\Content\Language\Handler.

eZ\Publish\Core\Persistence\Legacy\Content\Language\Handler::loadByLanguageCode (   $languageCode)

Get language by Language Code (eg: eng-GB)

Parameters
string$languageCode
Exceptions
\eZ\Publish\API\Repository\Exceptions\NotFoundExceptionIf language could not be found by $languageCode
Returns

Implements eZ\Publish\SPI\Persistence\Content\Language\Handler.

eZ\Publish\Core\Persistence\Legacy\Content\Language\Handler::update ( Language  $language)

Update language.

Parameters
\eZ\Publish\SPI\Persistence\Content\Language$language

Implements eZ\Publish\SPI\Persistence\Content\Language\Handler.

Member Data Documentation

eZ\Publish\Core\Persistence\Legacy\Content\Language\Handler::$languageGateway
protected
eZ\Publish\Core\Persistence\Legacy\Content\Language\Handler::$languageMapper
protected

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