eZPublishCommunityProject  2012.12
eZ\Bundle\EzPublishLegacyBundle\SetupWizard\ConfigurationConverter Class Reference

Handles conversionlegacy eZ Publish 4 parameters from a set of settings to a configuration array suitable for yml dumping. More...

Public Member Functions

 __construct (LegacyConfigResolver $legacyResolver,\Closure $legacyKernel, array $supportedPackages)
 
 fromLegacy ($sitePackage, $adminSiteaccess)
 Converts from legacy settings to an array dumpable to ezpublish.yml. More...
 
 getGroup ($groupName, $file=null, $siteaccess=null)
 Returns the contents of the legacy group $groupName. More...
 
 getParameter ($groupName, $parameterName, $file=null, $siteaccess=null)
 Returns the value of the legacy parameter $parameterName in $groupName. More...
 

Protected Member Functions

 getImageVariations (array $siteList, $groupName)
 Returns the image variations settings for all siteaccess unless it's the same for each one, in this case, it returns the variations settings for the group. More...
 
 getImageVariationsForSiteaccess ($siteaccess)
 Returns the image variation settings for the siteaccess. More...
 
 getLanguages (array $siteList, $groupName)
 Returns the languages list for all siteaccess unless it's the same for each one, in this case, it returns the languages list for the group. More...
 
 mapDatabaseType ($databaseType)
 
 resolveHostMatching ($siteaccessSettings)
 Parses Legacy HostMatching settings to a matching array. More...
 
 resolveMapMatch ($mapArray)
 
 resolveMatching ()
 
 resolveTextMatch ($siteaccessSettings, $prefixKey, $suffixKey)
 
 resolveUriMatching ($siteaccessSettings)
 

Protected Attributes

 $legacyKernel
 
 $legacyResolver
 
 $supportedPackages
 

Detailed Description

Handles conversionlegacy eZ Publish 4 parameters from a set of settings to a configuration array suitable for yml dumping.

Constructor & Destructor Documentation

eZ\Bundle\EzPublishLegacyBundle\SetupWizard\ConfigurationConverter::__construct ( LegacyConfigResolver  $legacyResolver,
\Closure  $legacyKernel,
array  $supportedPackages 
)

Member Function Documentation

eZ\Bundle\EzPublishLegacyBundle\SetupWizard\ConfigurationConverter::fromLegacy (   $sitePackage,
  $adminSiteaccess 
)

Converts from legacy settings to an array dumpable to ezpublish.yml.

Parameters
string$sitePackageName of the chosen install package
string$adminSiteaccessName of the admin siteaccess
Exceptions
\eZ\Publish\Core\Base\Exceptions\InvalidArgumentException
Returns
array
eZ\Bundle\EzPublishLegacyBundle\SetupWizard\ConfigurationConverter::getGroup (   $groupName,
  $file = null,
  $siteaccess = null 
)

Returns the contents of the legacy group $groupName.

If $file and $siteaccess are null, the global value is fetched with the legacy resolver.

Parameters
string$groupName
string | null$namespace
string | null$siteaccess
Returns
array

Referenced by eZ\Bundle\EzPublishLegacyBundle\SetupWizard\ConfigurationConverter\fromLegacy(), eZ\Bundle\EzPublishLegacyBundle\SetupWizard\ConfigurationConverter\getImageVariationsForSiteaccess(), and eZ\Bundle\EzPublishLegacyBundle\SetupWizard\ConfigurationConverter\resolveMatching().

eZ\Bundle\EzPublishLegacyBundle\SetupWizard\ConfigurationConverter::getImageVariations ( array  $siteList,
  $groupName 
)
protected

Returns the image variations settings for all siteaccess unless it's the same for each one, in this case, it returns the variations settings for the group.

This avoids to duplicate the image variations settings

Parameters
array$siteList
string$groupName
Returns
array

Referenced by eZ\Bundle\EzPublishLegacyBundle\SetupWizard\ConfigurationConverter\fromLegacy().

eZ\Bundle\EzPublishLegacyBundle\SetupWizard\ConfigurationConverter::getImageVariationsForSiteaccess (   $siteaccess)
protected

Returns the image variation settings for the siteaccess.

Parameters
string$siteaccess
Returns
array

Referenced by eZ\Bundle\EzPublishLegacyBundle\SetupWizard\ConfigurationConverter\getImageVariations().

eZ\Bundle\EzPublishLegacyBundle\SetupWizard\ConfigurationConverter::getLanguages ( array  $siteList,
  $groupName 
)
protected

Returns the languages list for all siteaccess unless it's the same for each one, in this case, it returns the languages list for the group.

Parameters
array$siteList
string$groupName
Returns
array

Referenced by eZ\Bundle\EzPublishLegacyBundle\SetupWizard\ConfigurationConverter\fromLegacy().

eZ\Bundle\EzPublishLegacyBundle\SetupWizard\ConfigurationConverter::getParameter (   $groupName,
  $parameterName,
  $file = null,
  $siteaccess = null 
)

Returns the value of the legacy parameter $parameterName in $groupName.

If $file and $siteaccess are null, the global value is fetched with the legacy resolver.

Parameters
string$groupName
string$parameterName
string | null$file
string | null$siteaccess
Returns
array

Referenced by eZ\Bundle\EzPublishLegacyBundle\SetupWizard\ConfigurationConverter\fromLegacy(), and eZ\Bundle\EzPublishLegacyBundle\SetupWizard\ConfigurationConverter\getLanguages().

eZ\Bundle\EzPublishLegacyBundle\SetupWizard\ConfigurationConverter::mapDatabaseType (   $databaseType)
protected
eZ\Bundle\EzPublishLegacyBundle\SetupWizard\ConfigurationConverter::resolveHostMatching (   $siteaccessSettings)
protected

Parses Legacy HostMatching settings to a matching array.

Parameters
mixed[]$siteaccessSettings
Exceptions
\eZ\Publish\Core\Base\Exceptions\InvalidArgumentException
Returns
array|bool

Referenced by eZ\Bundle\EzPublishLegacyBundle\SetupWizard\ConfigurationConverter\resolveMatching().

eZ\Bundle\EzPublishLegacyBundle\SetupWizard\ConfigurationConverter::resolveMapMatch (   $mapArray)
protected
eZ\Bundle\EzPublishLegacyBundle\SetupWizard\ConfigurationConverter::resolveMatching ( )
protected
eZ\Bundle\EzPublishLegacyBundle\SetupWizard\ConfigurationConverter::resolveTextMatch (   $siteaccessSettings,
  $prefixKey,
  $suffixKey 
)
protected
eZ\Bundle\EzPublishLegacyBundle\SetupWizard\ConfigurationConverter::resolveUriMatching (   $siteaccessSettings)
protected

Member Data Documentation

eZ\Bundle\EzPublishLegacyBundle\SetupWizard\ConfigurationConverter::$legacyKernel
protected
eZ\Bundle\EzPublishLegacyBundle\SetupWizard\ConfigurationConverter::$legacyResolver
protected
eZ\Bundle\EzPublishLegacyBundle\SetupWizard\ConfigurationConverter::$supportedPackages
protected

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