public function isActionAvailable($object, $action)
    {
        $method = $this->getActionMethod($action);
        try {
            $ref = new \ReflectionMethod($object, $method);
            if ($ref->isPublic() && $method === $ref->name) {
                return true;
            } else {
                return false;
            }
        } catch (\ReflectionException $e) {
            return false;
        }
    }
public function isActionAvailable($object, $action)
    {
        $method = $this->getActionMethod($action);
        try {
            $ref = new \ReflectionMethod($object, $method);
            if ($ref->isPublic() && $method === $ref->name) {
                return true;
            } else {
                return false;
            }
        } catch (\ReflectionException $e) {
            return false;
        }
    }
public function isActionAvailable ( $ object , $ action ) { $ method = $ this -> getActionMethod ( $ action ) ; try { $ ref = new \ ReflectionMethod ( $ object , $ method ) ; if ( $ ref -> isPublic ( ) && $ method === $ ref -> name ) { return true ; } else { return false ; } } catch ( \ ReflectionException $ e ) { return false ; } }
Check if action name is available

Returns false when
1. method is not found
2. method is not public
3. method letters case error

@param object $object The object of controller
@param string $action The name of action
@return bool
Check if action name is available