Property | Type | Description | |
---|---|---|---|
$defaultSiteAccess | string | Name of the default siteaccess. | |
$logger | Psr\Log\LoggerInterface | ||
$matcherBuilder | eZ\Publish\Core\MVC\Symfony\SiteAccess\MatcherBuilderInterface | ||
$request | |||
$siteAccess | |||
$siteAccessClass | |||
$siteAccessList | array | Siteaccess name is the key, "true" is the value. | |
$siteAccessesConfiguration | array | Consists in an hash indexed by matcher type class.
Value is a hash where index is what to match against and value is the corresponding siteaccess name.
Example:
array(
Using built-in URI matcher. Key is the prefix that matches the siteaccess, in the value
"Map\\URI" => array(
"ezdemo_site" => "ezdemo_site",
"ezdemo_site_admin" => "ezdemo_site_admin",
),
Using built-in HOST matcher. Key is the hostname, value is the siteaccess name
"Map\\Host" => array(
"ezpublish.dev" => "ezdemo_site",
"ezpublish.admin.dev" => "ezdemo_site_admin",
),
Using a custom matcher (class must begin with a '\', as a full qualified class name).
The custom matcher must implement eZ\Publish\Core\MVC\Symfony\SiteAccess\Matcher interface.
"\\My\\Custom\\Matcher" => array(
"something_to_match_against" => "siteaccess_name"
)
)
|
Method | Description | |
---|---|---|
__construct ( eZ\Publish\Core\MVC\Symfony\SiteAccess\MatcherBuilderInterface $matcherBuilder, Psr\Log\LoggerInterface $logger, string $defaultSiteAccess, array $siteAccessesConfiguration, array $siteAccessList, string | null $siteAccessClass = null ) | Constructor. | |
getRequest ( ) : |
||
getSiteAccess ( ) : |
||
match ( |
Performs SiteAccess matching given the $request. | |
matchByName ( string $siteAccessName ) : |
Matches a SiteAccess by name. | |
setSiteAccess ( |
Method | Description | |
---|---|---|
doMatch ( |
Returns the SiteAccess object matched against $request and the siteaccess configuration. |
public __construct ( eZ\Publish\Core\MVC\Symfony\SiteAccess\MatcherBuilderInterface $matcherBuilder, Psr\Log\LoggerInterface $logger, string $defaultSiteAccess, array $siteAccessesConfiguration, array $siteAccessList, string | null $siteAccessClass = null ) | ||
$matcherBuilder | eZ\Publish\Core\MVC\Symfony\SiteAccess\MatcherBuilderInterface | |
$logger | Psr\Log\LoggerInterface | |
$defaultSiteAccess | string | |
$siteAccessesConfiguration | array | |
$siteAccessList | array | |
$siteAccessClass | string | null |
public getRequest ( ) : |
||
return |
public getSiteAccess ( ) : |
||
return |
public match ( |
||
$request | ||
return |
public matchByName ( string $siteAccessName ) : |
||
$siteAccessName | string | |
return |
public setSiteAccess ( |
||
$siteAccess |
protected string $defaultSiteAccess | ||
return | string |
protected LoggerInterface,Psr\Log $logger | ||
return | Psr\Log\LoggerInterface |
protected MatcherBuilderInterface,eZ\Publish\Core\MVC\Symfony\SiteAccess $matcherBuilder | ||
return | eZ\Publish\Core\MVC\Symfony\SiteAccess\MatcherBuilderInterface |
protected SimplifiedRequest,eZ\Publish\Core\MVC\Symfony\Routing $request | ||
return |
protected SiteAccess,eZ\Publish\Core\MVC\Symfony $siteAccess | ||
return |
protected array $siteAccessList | ||
return | array |
array(
Using built-in URI matcher. Key is the prefix that matches the siteaccess, in the value
"Map\\URI" => array(
"ezdemo_site" => "ezdemo_site",
"ezdemo_site_admin" => "ezdemo_site_admin",
),
Using built-in HOST matcher. Key is the hostname, value is the siteaccess name
"Map\\Host" => array(
"ezpublish.dev" => "ezdemo_site",
"ezpublish.admin.dev" => "ezdemo_site_admin",
),
Using a custom matcher (class must begin with a '\', as a full qualified class name).
The custom matcher must implement eZ\Publish\Core\MVC\Symfony\SiteAccess\Matcher interface.
"\\My\\Custom\\Matcher" => array(
"something_to_match_against" => "siteaccess_name"
)
)
protected array $siteAccessesConfiguration | ||
return | array |