public function isAction($action)
{
$baseClass = new ReflectionClass('Cake\\Controller\\Controller');
if ($baseClass->hasMethod($action)) {
return false;
}
try {
$method = new ReflectionMethod($this, $action);
} catch (ReflectionException $e) {
return false;
}
return $method->isPublic();
}