예제 #1
0
 /**
  * Set Override Files
  *
  * @return  void
  */
 public function setOverrideFiles()
 {
     $includePaths = MVCOverrideHelperCodepool::addCodePath(null);
     foreach ($includePaths as $includePath) {
         if ($components = JFolder::folders($includePath)) {
             foreach ($components as $component) {
                 self::$componentList[$component] = $component;
                 $this->addOverrideFiles($includePath, $component);
             }
         }
     }
 }
예제 #2
0
 /**
  * Check if a file with the same path and class name exists in the override folder
  *
  * @param   string  $oldPath  Real file path
  * @param   string  $class    Name class
  *
  * @return bool|mixed
  */
 protected static function checkOverride($oldPath, $class)
 {
     $newPath = substr($oldPath, strlen(JPATH_SITE) + 1);
     if ($filePath = JPath::find(MVCOverrideHelperCodepool::addCodePath(null, true), $newPath)) {
         self::setOverrideFile($class, $oldPath, true, self::$prefix, self::$suffix);
         return include $filePath;
     }
     return false;
 }