Skip to content
Permalink
Browse files

Don't treat underscore prefixed methods of behavior as protected.

  • Loading branch information...
ADmad committed Sep 5, 2014
1 parent 89daa16 commit f5fcff75e517bfb434c4dafbee31217ca50ebc89
Showing with 4 additions and 7 deletions.
  1. +4 −7 src/ORM/Behavior.php
@@ -14,8 +14,8 @@
*/
namespace Cake\ORM;
use Cake\Core\InstanceConfigTrait;
use Cake\Core\Exception\Exception;
use Cake\Core\InstanceConfigTrait;
use Cake\Event\EventListener;
/**
@@ -331,12 +331,9 @@ protected function _reflectionCache() {
foreach ($reflection->getMethods(\ReflectionMethod::IS_PUBLIC) as $method) {
$methodName = $method->getName();
if (in_array($methodName, $baseMethods)) {
continue;
}
$methodName = $method->getName();
if (strpos($methodName, '_') === 0 || isset($eventMethods[$methodName])) {
if (in_array($methodName, $baseMethods) ||
isset($eventMethods[$methodName])
) {
continue;
}

0 comments on commit f5fcff7

Please sign in to comment.
You can’t perform that action at this time.