/**
  * Get file info
  *
  * @param   string  $includePath  Path for check inner files
  * @param   string  $component    Component name folder
  * @param   string  $filePath     Checking file path
  * @param   string  $type         Type file
  * @param   string  $indexName    Name usage for helper index
  *
  * @return stdClass
  */
 private function getOverrideFileInfo($includePath, $component, $filePath, $type = '', $indexName = '')
 {
     $filePath = JPath::clean($filePath);
     $sameFolderPrefix = $component . '/' . $type;
     if ($type == 'helpers') {
         $app = JFactory::getApplication();
         $baseName = basename($filePath);
         $prefix = substr($baseName, 0, 5);
         if ($app->isAdmin() && $prefix == 'admin' || !$app->isAdmin() && $prefix != 'admin' || !(!$app->isAdmin() && $prefix == 'admin')) {
             $realPath = JPATH_SITE . '/components' . substr($filePath, strlen($includePath));
         } else {
             $realPath = JPATH_ADMINISTRATOR . '/components/' . $sameFolderPrefix . '/' . substr($baseName, 5);
         }
     } else {
         $realPath = JPATH_BASE . '/components/' . substr($filePath, strlen($includePath));
     }
     $realPath = JPath::clean($realPath);
     if (!JFile::exists($realPath)) {
         return;
     }
     $forOverrideFile = file_get_contents($realPath);
     $originalClass = MVCOverrideHelperOverride::getOriginalClass($forOverrideFile);
     unset($forOverrideFile);
     if ($type == 'helpers') {
         JLoader::register($indexName, $filePath);
     } else {
         // Set path for new file
         MVCLoader::setOverrideFile($originalClass, $filePath);
     }
     // Set path for override file
     MVCLoader::setOverrideFile($originalClass, $realPath, true, $this->params->get('extendPrefix', ''), $this->params->get('extendSuffix', 'Default'));
 }
 /**
  * Load Override File
  *
  * @param   string  $oldPath  Path file for override and load
  * @param   string  $prefix   Prefix for extend files
  * @param   string  $suffix   Suffix for extend files
  *
  * @return bool
  */
 protected static function loadOverrideFile($oldPath, $prefix, $suffix)
 {
     $bufferContent = MVCOverrideHelperOverride::createDefaultClass($oldPath, $prefix, $suffix);
     // Change private methods to protected methods
     if (self::$changePrivate) {
         $bufferContent = preg_replace('/private *function/i', 'protected function', $bufferContent);
     }
     MVCOverrideHelperOverride::load($bufferContent);
     return true;
 }