public function filters(){ return array( ’postOnly + edit, create’, array( ’application.filters.PerformanceFilter - edit, create’, ’unit’=>’second’, ), );}postOnly是基于方法的,因为相关的方法已经在CController定义了,而performanceFileter是基于对象的,由上面可以看得出是保存在protected/filters/PerformanceFilter文件,用 + 号和 – 号可以定义哪些actions在过滤器里面使用或者不使用

相关文章:

  • 2021-12-30
  • 2021-06-15
  • 2021-11-18
  • 2021-05-18
  • 2021-09-16
  • 2022-01-13
  • 2022-01-21
猜你喜欢
  • 2021-07-25
  • 2021-12-23
  • 2021-08-27
  • 2021-05-22
  • 2021-07-23
  • 2021-09-06
相关资源
相似解决方案