示例#1
0
 /**
  * testCreateByClassName
  *
  * @return  void
  */
 public function testCreateByClassName()
 {
     $filter = FilterHelper::create('Windwalker\\Form\\Test\\Stub\\StubFilter');
     $this->assertInstanceOf('Windwalker\\Form\\Test\\Stub\\StubFilter', $filter);
 }
示例#2
0
 /**
  * Method to get property Filter
  *
  * @return  string|FilterInterface|callable
  */
 public function getFilter()
 {
     if (!$this->filter instanceof FilterInterface && !is_callable($this->filter)) {
         $this->filter = FilterHelper::create($this->filter);
     }
     return $this->filter;
 }