当前位置: 首页>>代码示例>>PHP>>正文


PHP FilterChain::addFilter方法代码示例

本文整理汇总了PHP中Zend\Filter\FilterChain::addFilter方法的典型用法代码示例。如果您正苦于以下问题:PHP FilterChain::addFilter方法的具体用法?PHP FilterChain::addFilter怎么用?PHP FilterChain::addFilter使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Zend\Filter\FilterChain的用法示例。


在下文中一共展示了FilterChain::addFilter方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: _convertTableNameToClassName

 protected function _convertTableNameToClassName($tableName)
 {
     if ($this->_nameFilter == null) {
         $this->_nameFilter = new \Zend\Filter\FilterChain();
         $this->_nameFilter->addFilter(new \Zend\Filter\Word\UnderscoreToCamelCase());
     }
     return $this->_nameFilter->filter($tableName);
 }
开发者ID:heiglandreas,项目名称:zf2,代码行数:8,代码来源:DbTable.php

示例2: normalizeTag

 /**
  * Normalize tag
  *
  * Ensures tag is alphanumeric characters only, and all lowercase.
  *
  * @param  string $tag
  * @return string
  */
 public function normalizeTag($tag)
 {
     if (!isset($this->_tagFilter)) {
         $this->_tagFilter = new Filter\FilterChain();
         $this->_tagFilter->addFilter(new Filter\Alnum())->addFilter(new Filter\StringToLower());
     }
     return $this->_tagFilter->filter($tag);
 }
开发者ID:rexmac,项目名称:zf2,代码行数:16,代码来源:HtmlTag.php

示例3: testFilterOrder

 /**
  * Ensures that filters are executed in the expected order (FIFO)
  *
  * @return void
  */
 public function testFilterOrder()
 {
     $filter = new FilterChain();
     $filter->addFilter(new LowerCase())->addFilter(new StripUpperCase());
     $value = 'AbC';
     $valueExpected = 'abc';
     $this->assertEquals($valueExpected, $filter($value));
 }
开发者ID:stunti,项目名称:zf2,代码行数:13,代码来源:FilterChainTest.php

示例4: addDefaultFilter

 /**
  * Add a default filter
  *
  * @param string $filter
  *
  * @return void
  */
 public function addDefaultFilter(Filter\Filter $filter, $placement = Filter\FilterChain::CHAIN_APPEND)
 {
     if (!$this->_defaultFilter instanceof Filter\FilterChain) {
         $defaultFilter = new Filter\FilterChain();
         $defaultFilter->addFilter($filter);
         $this->_defaultFilter = $defaultFilter;
     }
     $this->_defaultFilter->addFilter($filter, $placement);
 }
开发者ID:alab1001101,项目名称:zf2,代码行数:16,代码来源:RendererAbstract.php


注:本文中的Zend\Filter\FilterChain::addFilter方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。