Example #1
0
 public function testSetTargetByReferenceWorks()
 {
     $target = 'foo/:bar/:baz';
     $this->inflector->setTargetReference($target);
     $this->assertEquals('foo/:bar/:baz', $this->inflector->getTarget());
     $target .= '/:bat';
     $this->assertEquals('foo/:bar/:baz/:bat', $this->inflector->getTarget());
 }
Example #2
0
File: Layout.php Project: hjr3/zf2
 /**
  * Retrieve inflector
  *
  * @return \Zend\Filter\Inflector
  */
 public function getInflector()
 {
     if (null === $this->_inflector) {
         $inflector = new Filter\Inflector();
         $inflector->setTargetReference($this->_inflectorTarget)->addRules(array(':script' => array('Word\\CamelCaseToDash', 'StringToLower')))->setStaticRuleReference('suffix', $this->_viewSuffix);
         $this->setInflector($inflector);
     }
     return $this->_inflector;
 }