novactive / ezsiteaccessmatchers-bundle
该软件包已被 弃用 并不再维护。未建议替代软件包。
eZ publish 扩展包,提供额外的 siteaccess 匹配器
1.0.1
2018-03-26 08:12 UTC
Requires
- ezsystems/ezpublish-kernel: ^6.0 || ^7.0
- symfony/framework-bundle: ^2.0 || ^3.0
Requires (Dev)
- phpmd/phpmd: ^2.0
- phpunit/phpunit: ^5.0|^6.0|^7.0
- sebastian/phpcpd: ^3.0|^4.0
- squizlabs/php_codesniffer: ^3.0
This package is auto-updated.
Last update: 2020-11-13 02:34:02 UTC
README
关于
此 eZ publish 扩展包提供额外的 siteaccess 匹配器,适用于将 siteaccess 与 Platform.sh 动态环境 URL 进行映射。
新的匹配器包括:
- ExtendedHostElement:使用主机元素进行 siteaccess 识别,并替换字符串中提供的模式(例如:“-”由“_”替换)
- SuffixedHostElement:使用主机元素进行 siteaccess 识别,并在其后添加提供的字符串
- PrefixedHostElement:使用主机元素进行 siteaccess 识别,并在其前添加提供的字符串
安装
推荐通过 Composer 安装此扩展包。只需运行
composer require novactive/ezsiteaccessmatchers-bundle
在应用程序内核中注册扩展包
// ezpublish/EzPublishKernel.php public function registerBundles() { $bundles = array( // ... new Novactive\EzSiteaccessMatchersBundle\NovaEzSiteaccessMatchersBundle(), ); return $bundles; }
使用
ExtendedHostElement 匹配器
在您的 ezpublish/config/ezpublish.yml / app/config/ezplatform.yml 配置文件中
ezpublish: ... siteaccess: ... match: \Novactive\EzSiteaccessMatchersBundle\Matcher\ExtendedHostElement: elementNumber: 1 # Replacements config is not mandatory as following config is default one # replacements: # pattern: '-' # replacement: '_' # You could also provide array of patterns / replacements strings # replacements: # pattern: ['-'] # replacement: ['_']
SuffixedHostElement 匹配器
在您的 ezpublish/config/ezpublish.yml / app/config/ezplatform.yml 配置文件中
ezpublish: ... siteaccess: ... match: \Novactive\EzSiteaccessMatchersBundle\Matcher\SuffixedHostElement: elementNumber: 1 suffix: test
PrefixedHostElement 匹配器
在您的 ezpublish/config/ezpublish.yml / app/config/ezplatform.yml 配置文件中
ezpublish: ... siteaccess: ... match: \Novactive\EzSiteaccessMatchersBundle\Matcher\PrefixedHostElement: elementNumber: 1 prefix: test
许可证
此扩展包在 MIT 许可证下发布。请参阅扩展包中的完整许可证。
LICENSE