PHP Класс eZ\Publish\Core\MVC\Symfony\SiteAccess\Router

Наследование: implements eZ\Publish\Core\MVC\Symfony\SiteAccess\SiteAccessRouterInterface, implements eZ\Publish\Core\MVC\Symfony\SiteAccess\SiteAccessAware
Показать файл Открыть проект Примеры использования класса

Защищенные свойства (Protected)

Свойство Тип Описание
$defaultSiteAccess string Name of the default siteaccess.
$logger Psr\Log\LoggerInterface
$matcherBuilder eZ\Publish\Core\MVC\Symfony\SiteAccess\MatcherBuilderInterface
$request eZ\Publish\Core\MVC\Symfony\Routing\SimplifiedRequest
$siteAccess eZ\Publish\Core\MVC\Symfony\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" ) )

Открытые методы

Метод Описание
__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 ( ) : SimplifiedRequest
getSiteAccess ( ) : SiteAccess | null
match ( SimplifiedRequest $request ) : SiteAccess Performs SiteAccess matching given the $request.
matchByName ( string $siteAccessName ) : SiteAccess | null Matches a SiteAccess by name.
setSiteAccess ( SiteAccess $siteAccess = null )

Приватные методы

Метод Описание
doMatch ( SimplifiedRequest $request ) : SiteAccess Returns the SiteAccess object matched against $request and the siteaccess configuration.

Описание методов

__construct() публичный Метод

Constructor.
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

getRequest() публичный Метод

public getRequest ( ) : SimplifiedRequest
Результат eZ\Publish\Core\MVC\Symfony\Routing\SimplifiedRequest

getSiteAccess() публичный Метод

public getSiteAccess ( ) : SiteAccess | null
Результат eZ\Publish\Core\MVC\Symfony\SiteAccess | null

match() публичный Метод

Performs SiteAccess matching given the $request.
public match ( SimplifiedRequest $request ) : SiteAccess
$request eZ\Publish\Core\MVC\Symfony\Routing\SimplifiedRequest
Результат eZ\Publish\Core\MVC\Symfony\SiteAccess

matchByName() публичный Метод

Returns corresponding SiteAccess object, according to configuration, with corresponding matcher. Returns null if no matcher can be found (e.g. non versatile).
public matchByName ( string $siteAccessName ) : SiteAccess | null
$siteAccessName string
Результат eZ\Publish\Core\MVC\Symfony\SiteAccess | null

setSiteAccess() публичный Метод

public setSiteAccess ( SiteAccess $siteAccess = null )
$siteAccess eZ\Publish\Core\MVC\Symfony\SiteAccess

Описание свойств

$defaultSiteAccess защищенное свойство

Name of the default siteaccess.
protected string $defaultSiteAccess
Результат string

$logger защищенное свойство

protected LoggerInterface,Psr\Log $logger
Результат Psr\Log\LoggerInterface

$matcherBuilder защищенное свойство

protected MatcherBuilderInterface,eZ\Publish\Core\MVC\Symfony\SiteAccess $matcherBuilder
Результат eZ\Publish\Core\MVC\Symfony\SiteAccess\MatcherBuilderInterface

$request защищенное свойство

protected SimplifiedRequest,eZ\Publish\Core\MVC\Symfony\Routing $request
Результат eZ\Publish\Core\MVC\Symfony\Routing\SimplifiedRequest

$siteAccess защищенное свойство

protected SiteAccess,eZ\Publish\Core\MVC\Symfony $siteAccess
Результат eZ\Publish\Core\MVC\Symfony\SiteAccess

$siteAccessClass защищенное свойство

protected $siteAccessClass

$siteAccessList защищенное свойство

Siteaccess name is the key, "true" is the value.
protected array $siteAccessList
Результат array

$siteAccessesConfiguration защищенное свойство

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" ) )
protected array $siteAccessesConfiguration
Результат array