Source for file file.php

Documentation is available at file.php

  1. <?php
  2. /**
  3.  * @package     FrameworkOnFramework
  4.  * @subpackage  layout
  5.  * @copyright   Copyright (C) 2010 - 2012 Akeeba Ltd. All rights reserved.
  6.  * @license     GNU General Public License version 2 or later; see LICENSE.txt
  7.  */
  8. // Protect from unauthorized access
  9. defined('_JEXEC'or die;
  10.  
  11. /**
  12.  * Base class for rendering a display layout
  13.  * loaded from from a layout file
  14.  *
  15.  * This class searches for Joomla! version override Layouts. For example,
  16.  * if you have run this under Joomla! 3.0 and you try to load
  17.  * mylayout.default it will automatically search for the
  18.  * layout files default.j30.php, default.j3.php and default.php, in this
  19.  * order.
  20.  *
  21.  * @package  FrameworkOnFramework
  22.  * @since    1.0
  23.  */
  24. class FOFLayoutFile extends JLayoutFile
  25. {
  26.     /**
  27.      * Method to finds the full real file path, checking possible overrides
  28.      *
  29.      * @return  string  The full path to the layout file
  30.      */
  31.     protected function getPath()
  32.     {
  33.         jimport('joomla.filesystem.path');
  34.  
  35.         if (is_null($this->fullPath&& !empty($this->layoutId))
  36.         {
  37.             $parts explode('.'$this->layoutId);
  38.             $file  array_pop($parts);
  39.  
  40.             $filePath implode('/'$parts);
  41.             $suffixes FOFPlatform::getInstance()->getTemplateSuffixes();
  42.  
  43.             foreach ($suffixes as $suffix)
  44.             {
  45.                 $files[$file $suffix '.php';
  46.             }
  47.  
  48.             $files[$file '.php';
  49.  
  50.             $possiblePaths array(
  51.                 JPATH_THEMES '/' JFactory::getApplication()->getTemplate('/html/layouts/' $filePath,
  52.                 $this->basePath . '/' $filePath
  53.             );
  54.  
  55.             reset($files);
  56.  
  57.             while ((list($fileNameeach($files)) && is_null($this->fullPath))
  58.             {
  59.                 $r JPath::find($possiblePaths$fileName);
  60.                 $this->fullPath = $r === false null $r;
  61.             }
  62.         }
  63.  
  64.         return $this->fullPath;
  65.     }
  66. }

Documentation generated on Tue, 19 Nov 2013 15:03:08 +0100 by phpDocumentor 1.4.3