original_string: public function actionExists($name, $internal = false)
      {
          if (!strlen($name) || substr($name, 0, 1) == '_' || !$this->methodExists($name)) {
              return false;
          }
  
          foreach ($this->hiddenActions as $method) {
              if (strtolower($name) == strtolower($method)) {
                  return false;
              }
          }
  
          $ownMethod = method_exists($this, $name);
  
          if ($ownMethod) {
              $methodInfo = new \ReflectionMethod($this, $name);
              $public = $methodInfo->isPublic();
              if ($public) {
                  return true;
              }
          }
  
          if ($internal && (($ownMethod && $methodInfo->isProtected()) || !$ownMethod)) {
              return true;
          }
  
          if (!$ownMethod) {
              return true;
          }
  
          return false;
      }
code: public function actionExists($name, $internal = false)
      {
          if (!strlen($name) || substr($name, 0, 1) == '_' || !$this->methodExists($name)) {
              return false;
          }
  
          foreach ($this->hiddenActions as $method) {
              if (strtolower($name) == strtolower($method)) {
                  return false;
              }
          }
  
          $ownMethod = method_exists($this, $name);
  
          if ($ownMethod) {
              $methodInfo = new \ReflectionMethod($this, $name);
              $public = $methodInfo->isPublic();
              if ($public) {
                  return true;
              }
          }
  
          if ($internal && (($ownMethod && $methodInfo->isProtected()) || !$ownMethod)) {
              return true;
          }
  
          if (!$ownMethod) {
              return true;
          }
  
          return false;
      }
code_tokens: public function actionExists ( $ name , $ internal = false ) { if ( ! strlen ( $ name ) || substr ( $ name , 0 , 1 ) == '_' || ! $ this -> methodExists ( $ name ) ) { return false ; } foreach ( $ this -> hiddenActions as $ method ) { if ( strtolower ( $ name ) == strtolower ( $ method ) ) { return false ; } } $ ownMethod = method_exists ( $ this , $ name ) ; if ( $ ownMethod ) { $ methodInfo = new \ ReflectionMethod ( $ this , $ name ) ; $ public = $ methodInfo -> isPublic ( ) ; if ( $ public ) { return true ; } } if ( $ internal && ( ( $ ownMethod && $ methodInfo -> isProtected ( ) ) || ! $ ownMethod ) ) { return true ; } if ( ! $ ownMethod ) { return true ; } return false ; }
docstring: This method is used internally.
  Determines whether an action with the specified name exists.
  Action must be a class public method. Action name can not be prefixed with the underscore character.
  @param string $name Specifies the action name.
  @param bool $internal Allow protected actions.
  @return boolean
docstring_tokens: This method is used internally . Determines whether an action with the specified name exists . Action must be a class public method . Action name can not be prefixed with the underscore character .