| Current Path : /home/digilove/public_html/41423/ |
| Current File : //home/digilove/public_html/41423/component.php.tar |
home/digilove/public_html/templates/protostar/component.php 0000644 00000002451 15234424022 0020346 0 ustar 00 <?php
/**
* @package Joomla.Site
* @subpackage Templates.protostar
*
* @copyright (C) 2012 Open Source Matters, Inc. <https://www.joomla.org>
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/
defined('_JEXEC') or die;
/** @var JDocumentHtml $this */
$app = JFactory::getApplication();
// Output as HTML5
$this->setHtml5(true);
// Add JavaScript Frameworks
JHtml::_('bootstrap.framework');
// Add template js
JHtml::_('script', 'template.js', array('version' => 'auto', 'relative' => true));
// Add html5 shiv
JHtml::_('script', 'jui/html5.js', array('version' => 'auto', 'relative' => true, 'conditional' => 'lt IE 9'));
// Add Stylesheets
JHtml::_('stylesheet', 'template.css', array('version' => 'auto', 'relative' => true));
// Load optional rtl Bootstrap css and Bootstrap bugfixes
JHtml::_('bootstrap.loadCss', $includeMaincss = false, $this->direction);
?>
<!DOCTYPE html>
<html lang="<?php echo $this->language; ?>" dir="<?php echo $this->direction; ?>">
<head>
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1" />
<jdoc:include type="head" />
</head>
<body class="contentpane modal<?php echo $this->direction === 'rtl' ? ' rtl' : ''; ?>">
<jdoc:include type="message" />
<jdoc:include type="component" />
</body>
</html>
home/digilove/public_html/templates/beez3/component.php 0000644 00000003741 15234433164 0017333 0 ustar 00 <?php
/**
* @package Joomla.Site
* @subpackage Templates.beez3
*
* @copyright (C) 2010 Open Source Matters, Inc. <https://www.joomla.org>
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/
defined('_JEXEC') or die;
/** @var JDocumentHtml $this */
$color = $this->params->get('templatecolor');
// Output as HTML5
$this->setHtml5(true);
// Add html5 shiv
JHtml::_('script', 'jui/html5.js', array('version' => 'auto', 'relative' => true, 'conditional' => 'lt IE 9'));
// Add stylesheets
JHtml::_('stylesheet', 'templates/system/css/system.css', array('version' => 'auto'));
JHtml::_('stylesheet', 'template.css', array('version' => 'auto', 'relative' => true));
JHtml::_('stylesheet', 'position.css', array('version' => 'auto', 'relative' => true));
JHtml::_('stylesheet', 'layout.css', array('version' => 'auto', 'relative' => true));
JHtml::_('stylesheet', 'print.css', array('version' => 'auto', 'relative' => true), array('media' => 'print'));
JHtml::_('stylesheet', 'general.css', array('version' => 'auto', 'relative' => true));
JHtml::_('stylesheet', htmlspecialchars($color, ENT_COMPAT, 'UTF-8') . '.css', array('version' => 'auto', 'relative' => true));
if ($this->direction === 'rtl')
{
JHtml::_('stylesheet', 'template_rtl.css', array('version' => 'auto', 'relative' => true));
JHtml::_('stylesheet', htmlspecialchars($color, ENT_COMPAT, 'UTF-8') . '_rtl.css', array('version' => 'auto', 'relative' => true));
}
JHtml::_('stylesheet', 'ieonly.css', array('version' => 'auto', 'relative' => true, 'conditional' => 'lte IE 6'));
// Check for a custom CSS file
JHtml::_('stylesheet', 'user.css', array('version' => 'auto', 'relative' => true));
?>
<!DOCTYPE html>
<html lang="<?php echo $this->language; ?>" dir="<?php echo $this->direction; ?>">
<head>
<jdoc:include type="head" />
</head>
<body class="contentpane">
<div id="all">
<div id="main">
<jdoc:include type="message" />
<jdoc:include type="component" />
</div>
</div>
</body>
</html>
home/digilove/public_html/templates/system/component.php 0000644 00000001466 15234435013 0017644 0 ustar 00 <?php
/**
* @package Joomla.Site
* @subpackage Template.system
*
* @copyright (C) 2005 Open Source Matters, Inc. <https://www.joomla.org>
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/
defined('_JEXEC') or die;
/** @var JDocumentHtml $this */
// Output as HTML5
$this->setHtml5(true);
// Add html5 shiv
JHtml::_('script', 'jui/html5.js', array('version' => 'auto', 'relative' => true, 'conditional' => 'lt IE 9'));
// Styles
JHtml::_('stylesheet', 'general.css', array('version' => 'auto', 'relative' => true));
?>
<!DOCTYPE html>
<html lang="<?php echo $this->language; ?>" dir="<?php echo $this->direction; ?>">
<head>
<jdoc:include type="head" />
</head>
<body class="contentpane">
<jdoc:include type="message" />
<jdoc:include type="component" />
</body>
</html>
home/digilove/public_html/templates/sj_revo/component.php 0000644 00000005421 15234436720 0017770 0 ustar 00 <?php
/**
* @copyright Copyright (C) 2008 JoomlaPraise. All rights reserved.
*/
// no direct access
defined('_JEXEC') or die;
// getting document object
$doc = JFactory::getDocument();
// Check for the print page
$print = JRequest::getCmd('print');
// Check for the mail page
$mailto = JRequest::getCmd('option') == 'com_mailto';
$params = JFactory::getApplication()->getTemplate(true)->params;
?>
<!DOCTYPE html>
<html lang="<?php echo $this->language; ?>">
<head>
<jdoc:include type="head" />
<?php if($mailto == true) : ?>
<?php $this->addStyleSheet(JURI::base() . 'templates/' . $this->template . '/css/mail.css'); ?>
<?php endif; ?>
<link rel="stylesheet" href="<?php echo $this->baseurl; ?>/templates/system/css/general.css" type="text/css" />
<link rel="stylesheet" href="<?php echo $this->baseurl; ?>/templates/system/css/system.css" type="text/css" />
<link rel="stylesheet" href="<?php echo $this->baseurl; ?>/templates/system/css/editor.css" type="text/css" />
<link rel="stylesheet" href="<?php echo $this->baseurl; ?>/templates/protostar/css/template.css" type="text/css" />
<?php $this->addScript(JURI::base() . 'templates/' . $this->template . '/asset/bootstrap/js/bootstrap.min.js'); ?>
<?php if($print == 1) : ?>
<link rel="stylesheet" href="<?php echo JURI::base(); ?>templates/<?php echo $this->template; ?>/css/print.css" type="text/css" media="screen" />
<link rel="stylesheet" href="<?php echo JURI::base(); ?>templates/<?php echo $this->template; ?>/css/template-red.css" type="text/css" />
<link rel="stylesheet" href="<?php echo JURI::base(); ?>templates/<?php echo $this->template; ?>/asset/fonts/awesome/css/font-awesome.min.css" type="text/css"/>
<?php endif; ?>
</head>
<body class="contentpane">
<?php
if($print == 1) :
$logo_text = $params->get('logoText', '') != '' ? $params->get('logoText', '') : $params->getPageName();
$logo_slogan = $params->get('sloganText', '');
?>
<div id="print-top">
<img src="<?php echo JURI::base(); ?>templates/<?php echo $this->template; ?>/images/logo_print.png" alt="<?php echo $logo_text . ' - ' . $logo_slogan; ?>" />
</div>
<?php endif; ?>
<jdoc:include type="message" />
<jdoc:include type="component" />
<?php if($print == 1) : ?>
<div id="print-bottom">
<?php if($params->get('ytcopyright', '') == '') : ?>
© Smartaddons - <a href="http://smartaddons.com/" title="Free Joomla! 3.0 Template">Beautiful Joomla! and WordPress Themes</a> <?php echo date('Y');?>
<?php else : ?>
<?php
$ytcopyright = $params->get('ytcopyright', '');
$ytcopyright = str_replace('{year}', date('Y'), $ytcopyright);
echo $ytcopyright;
?>
<?php endif; ?>
</div>
<?php endif; ?>
</body>
</html>
home/digilove/public_html/templates/vmbeez3/component.php 0000644 00000003756 15234460225 0017702 0 ustar 00 <?php
/**
* @package Joomla.Site
* @subpackage Templates.beez3
*
* @copyright Copyright (C) 2005 - 2020 Open Source Matters, Inc. All rights reserved.
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/
defined('_JEXEC') or die;
/** @var JDocumentHtml $this */
$color = $this->params->get('templatecolor');
// Output as HTML5
$this->setHtml5(true);
// Add html5 shiv
JHtml::_('script', 'jui/html5.js', array('version' => 'auto', 'relative' => true, 'conditional' => 'lt IE 9'));
// Add stylesheets
JHtml::_('stylesheet', 'templates/system/css/system.css', array('version' => 'auto'));
JHtml::_('stylesheet', 'template.css', array('version' => 'auto', 'relative' => true));
JHtml::_('stylesheet', 'position.css', array('version' => 'auto', 'relative' => true));
JHtml::_('stylesheet', 'layout.css', array('version' => 'auto', 'relative' => true));
JHtml::_('stylesheet', 'print.css', array('version' => 'auto', 'relative' => true), array('media' => 'print'));
JHtml::_('stylesheet', 'general.css', array('version' => 'auto', 'relative' => true));
JHtml::_('stylesheet', htmlspecialchars($color, ENT_COMPAT, 'UTF-8') . '.css', array('version' => 'auto', 'relative' => true));
if ($this->direction === 'rtl')
{
JHtml::_('stylesheet', 'template_rtl.css', array('version' => 'auto', 'relative' => true));
JHtml::_('stylesheet', htmlspecialchars($color, ENT_COMPAT, 'UTF-8') . '_rtl.css', array('version' => 'auto', 'relative' => true));
}
JHtml::_('stylesheet', 'ieonly.css', array('version' => 'auto', 'relative' => true, 'conditional' => 'lte IE 6'));
// Check for a custom CSS file
JHtml::_('stylesheet', 'user.css', array('version' => 'auto', 'relative' => true));
?>
<!DOCTYPE html>
<html lang="<?php echo $this->language; ?>" dir="<?php echo $this->direction; ?>">
<head>
<jdoc:include type="head" />
</head>
<body class="contentpane">
<div id="all">
<div id="main">
<jdoc:include type="message" />
<jdoc:include type="component" />
</div>
</div>
</body>
</html>
home/digilove/public_html/templates/horme_3/component.php 0000644 00000004316 15234465132 0017656 0 ustar 00 <?php
/**
* @package Horme 3 template
* @author Spiros Petrakis
* @copyright Copyright (C) 2015 - 2022 Spiros Petrakis. All rights reserved.
* @license GNU General Public License version 2 or later
*
*/
defined('_JEXEC') or die;
JHtml::_('jquery.framework');
JHtml::_('bootstrap.framework');
$app = JFactory::getApplication();
$doc = JFactory::getDocument();
$view = $app->input->getCmd('view');
$option = $app->input->getCmd('option');
$tmpl = $app->input->getCmd('tmpl');
$layout = $app->input->getCmd('layout');
if ( $layout =='modal' || $option == 'com_media' ) {
$doc->addStyleSheet(JURI::root(true).'/administrator/templates/isis/css/template.css');
} else {
include_once JPATH_THEMES.'/'.$this->template.'/logic.php'; // load logic.php
}
?>
<!DOCTYPE html>
<html lang="<?php echo $this->language; ?>" dir="<?php echo $this->direction; ?>">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no">
<meta name="robots" content="noindex, nofollow" />
<jdoc:include type="head" />
<?php if ($option == 'com_media') { ?>
<style>
body{
padding: 0;
}
.row{
margin-left: 0;
}
.row-fluid .span6 {
width: 48%;
}
.thumbnails > li {
float: left;
margin-left: 5px;
}
</style>
<?php } ?>
<?php if ($app->input->getVar( 'print' ) == 1) { ?>
<link rel="stylesheet" href="<?php echo $tpath; ?>/css/print.css" type="text/css" />
<style>
.back-to-category,
.product-fields,
.ask-a-question,
.addthis_toolbox,
.next-page,
.previus-page,
.addtocart-bar,
.icons,
.product-neighbours {
display: none;
}
a[href^="/"]:after{
content:"";
}
</style>
<?php } ?>
<?php if ($this->params->get('customcss')) : ?>
<link rel="stylesheet" href="<?php echo $tpath; ?>/css/custom.css" type="text/css" />
<?php endif; ?>
</head>
<body class="contentpane tmpl" style="background: none !important;">
<div class="container-fluid" style="box-shadow:none !important; border:none !important; background: none !important;">
<div class="row">
<div class="col-md-12 span12">
<jdoc:include type="message" />
<jdoc:include type="component" />
</div>
</div>
</div>
</body>
</html>
home/digilove/public_html/libraries/fof/autoloader/component.php 0000644 00000047172 15235134327 0021220 0 ustar 00 <?php
/**
* @package FrameworkOnFramework
* @subpackage autoloader
* @copyright Copyright (C) 2010-2016 Nicholas K. Dionysopoulos / Akeeba Ltd. All rights reserved.
* @license GNU General Public License version 2, or later
* @note This file has been modified by the Joomla! Project and no longer reflects the original work of its author.
*/
defined('FOF_INCLUDED') or die();
/**
* An autoloader for FOF-powered components. It allows the autoloading of
* various classes related to the operation of a component, from Controllers
* and Models to Helpers and Fields. If a class doesn't exist, it will be
* created on the fly.
*
* @package FrameworkOnFramework
* @subpackage autoloader
* @since 2.1
*/
class FOFAutoloaderComponent
{
/**
* An instance of this autoloader
*
* @var FOFAutoloaderComponent
*/
public static $autoloader = null;
/**
* The path to the FOF root directory
*
* @var string
*/
public static $fofPath = null;
/**
* An array holding component names and their FOF-ness status
*
* @var array
*/
protected static $fofComponents = array();
/**
* Initialise this autoloader
*
* @return FOFAutoloaderComponent
*/
public static function init()
{
if (self::$autoloader == null)
{
self::$autoloader = new self;
}
return self::$autoloader;
}
/**
* Public constructor. Registers the autoloader with PHP.
*/
public function __construct()
{
self::$fofPath = realpath(__DIR__ . '/../');
spl_autoload_register(array($this,'autoload_fof_controller'));
spl_autoload_register(array($this,'autoload_fof_model'));
spl_autoload_register(array($this,'autoload_fof_view'));
spl_autoload_register(array($this,'autoload_fof_table'));
spl_autoload_register(array($this,'autoload_fof_helper'));
spl_autoload_register(array($this,'autoload_fof_toolbar'));
spl_autoload_register(array($this,'autoload_fof_field'));
}
/**
* Returns true if this is a FOF-powered component, i.e. if it has a fof.xml
* file in its main directory.
*
* @param string $component The component's name
*
* @return boolean
*/
public function isFOFComponent($component)
{
if (!isset($fofComponents[$component]))
{
$componentPaths = FOFPlatform::getInstance()->getComponentBaseDirs($component);
$fofComponents[$component] = file_exists($componentPaths['admin'] . '/fof.xml');
}
return $fofComponents[$component];
}
/**
* Creates class aliases. On systems where eval() is enabled it creates a
* real class. On other systems it merely creates an alias. The eval()
* method is preferred as class_aliases result in the name of the class
* being instantiated not being available, making it impossible to create
* a class instance without passing a $config array :(
*
* @param string $original The name of the original (existing) class
* @param string $alias The name of the new (aliased) class
* @param boolean $autoload Should I try to autoload the $original class?
*
* @return void
*/
private function class_alias($original, $alias, $autoload = true)
{
static $hasEval = null;
if (is_null($hasEval))
{
$hasEval = false;
if (function_exists('ini_get'))
{
$disabled_functions = ini_get('disabled_functions');
if (!is_string($disabled_functions))
{
$hasEval = true;
}
else
{
$disabled_functions = explode(',', $disabled_functions);
$hasEval = !in_array('eval', $disabled_functions);
}
}
}
if (!class_exists($original, $autoload))
{
return;
}
if ($hasEval)
{
$phpCode = "class $alias extends $original {}";
eval($phpCode);
}
else
{
class_alias($original, $alias, $autoload);
}
}
/**
* Autoload Controllers
*
* @param string $class_name The name of the class to load
*
* @return void
*/
public function autoload_fof_controller($class_name)
{
FOFPlatform::getInstance()->logDebug(__METHOD__ . "() autoloading $class_name");
static $isCli = null, $isAdmin = null;
if (is_null($isCli) && is_null($isAdmin))
{
list($isCli, $isAdmin) = FOFDispatcher::isCliAdmin();
}
if (strpos($class_name, 'Controller') === false)
{
return;
}
// Change from camel cased into a lowercase array
$class_modified = preg_replace('/(\s)+/', '_', $class_name);
$class_modified = strtolower(preg_replace('/(?<=\\w)([A-Z])/', '_\\1', $class_modified));
$parts = explode('_', $class_modified);
// We need three parts in the name
if (count($parts) != 3)
{
return;
}
// We need the second part to be "controller"
if ($parts[1] != 'controller')
{
return;
}
// Get the information about this class
$component_raw = $parts[0];
$component = 'com_' . $parts[0];
$view = $parts[2];
// Is this an FOF 2.1 or later component?
if (!$this->isFOFComponent($component))
{
return;
}
// Get the alternate view and class name (opposite singular/plural name)
$alt_view = FOFInflector::isSingular($view) ? FOFInflector::pluralize($view) : FOFInflector::singularize($view);
$alt_class = FOFInflector::camelize($component_raw . '_controller_' . $alt_view);
// Get the component's paths
$componentPaths = FOFPlatform::getInstance()->getComponentBaseDirs($component);
// Get the proper and alternate paths and file names
$file = "/controllers/$view.php";
$altFile = "/controllers/$alt_view.php";
$path = $componentPaths['main'];
$altPath = $componentPaths['alt'];
// Try to find the proper class in the proper path
if (file_exists($path . $file))
{
@include_once $path . $file;
}
// Try to find the proper class in the alternate path
if (!class_exists($class_name) && file_exists($altPath . $file))
{
@include_once $altPath . $file;
}
// Try to find the alternate class in the proper path
if (!class_exists($alt_class) && file_exists($path . $altFile))
{
@include_once $path . $altFile;
}
// Try to find the alternate class in the alternate path
if (!class_exists($alt_class) && file_exists($altPath . $altFile))
{
@include_once $altPath . $altFile;
}
// If the alternate class exists just map the class to the alternate
if (!class_exists($class_name) && class_exists($alt_class))
{
$this->class_alias($alt_class, $class_name);
}
// No class found? Map to FOFController
elseif (!class_exists($class_name))
{
if ($view != 'default')
{
$defaultClass = FOFInflector::camelize($component_raw . '_controller_default');
$this->class_alias($defaultClass, $class_name);
}
else
{
$this->class_alias('FOFController', $class_name);
}
}
}
/**
* Autoload Models
*
* @param string $class_name The name of the class to load
*
* @return void
*/
public function autoload_fof_model($class_name)
{
FOFPlatform::getInstance()->logDebug(__METHOD__ . "() autoloading $class_name");
static $isCli = null, $isAdmin = null;
if (is_null($isCli) && is_null($isAdmin))
{
list($isCli, $isAdmin) = FOFDispatcher::isCliAdmin();
}
if (strpos($class_name, 'Model') === false)
{
return;
}
// Change from camel cased into a lowercase array
$class_modified = preg_replace('/(\s)+/', '_', $class_name);
$class_modified = strtolower(preg_replace('/(?<=\\w)([A-Z])/', '_\\1', $class_modified));
$parts = explode('_', $class_modified);
// We need three parts in the name
if (count($parts) != 3)
{
return;
}
// We need the second part to be "model"
if ($parts[1] != 'model')
{
return;
}
// Get the information about this class
$component_raw = $parts[0];
$component = 'com_' . $parts[0];
$view = $parts[2];
// Is this an FOF 2.1 or later component?
if (!$this->isFOFComponent($component))
{
return;
}
// Get the alternate view and class name (opposite singular/plural name)
$alt_view = FOFInflector::isSingular($view) ? FOFInflector::pluralize($view) : FOFInflector::singularize($view);
$alt_class = FOFInflector::camelize($component_raw . '_model_' . $alt_view);
// Get the proper and alternate paths and file names
$componentPaths = FOFPlatform::getInstance()->getComponentBaseDirs($component);
$file = "/models/$view.php";
$altFile = "/models/$alt_view.php";
$path = $componentPaths['main'];
$altPath = $componentPaths['alt'];
// Try to find the proper class in the proper path
if (file_exists($path . $file))
{
@include_once $path . $file;
}
// Try to find the proper class in the alternate path
if (!class_exists($class_name) && file_exists($altPath . $file))
{
@include_once $altPath . $file;
}
// Try to find the alternate class in the proper path
if (!class_exists($alt_class) && file_exists($path . $altFile))
{
@include_once $path . $altFile;
}
// Try to find the alternate class in the alternate path
if (!class_exists($alt_class) && file_exists($altPath . $altFile))
{
@include_once $altPath . $altFile;
}
// If the alternate class exists just map the class to the alternate
if (!class_exists($class_name) && class_exists($alt_class))
{
$this->class_alias($alt_class, $class_name);
}
// No class found? Map to FOFModel
elseif (!class_exists($class_name))
{
if ($view != 'default')
{
$defaultClass = FOFInflector::camelize($component_raw . '_model_default');
$this->class_alias($defaultClass, $class_name);
}
else
{
$this->class_alias('FOFModel', $class_name, true);
}
}
}
/**
* Autoload Views
*
* @param string $class_name The name of the class to load
*
* @return void
*/
public function autoload_fof_view($class_name)
{
FOFPlatform::getInstance()->logDebug(__METHOD__ . "() autoloading $class_name");
static $isCli = null, $isAdmin = null;
if (is_null($isCli) && is_null($isAdmin))
{
list($isCli, $isAdmin) = FOFDispatcher::isCliAdmin();
}
if (strpos($class_name, 'View') === false)
{
return;
}
// Change from camel cased into a lowercase array
$class_modified = preg_replace('/(\s)+/', '_', $class_name);
$class_modified = strtolower(preg_replace('/(?<=\\w)([A-Z])/', '_\\1', $class_modified));
$parts = explode('_', $class_modified);
// We need at least three parts in the name
if (count($parts) < 3)
{
return;
}
// We need the second part to be "view"
if ($parts[1] != 'view')
{
return;
}
// Get the information about this class
$component_raw = $parts[0];
$component = 'com_' . $parts[0];
$view = $parts[2];
if (count($parts) > 3)
{
$format = $parts[3];
}
else
{
$input = new FOFInput;
$format = $input->getCmd('format', 'html', 'cmd');
}
// Is this an FOF 2.1 or later component?
if (!$this->isFOFComponent($component))
{
return;
}
// Get the alternate view and class name (opposite singular/plural name)
$alt_view = FOFInflector::isSingular($view) ? FOFInflector::pluralize($view) : FOFInflector::singularize($view);
$alt_class = FOFInflector::camelize($component_raw . '_view_' . $alt_view);
// Get the proper and alternate paths and file names
$componentPaths = FOFPlatform::getInstance()->getComponentBaseDirs($component);
$protoFile = "/models/$view";
$protoAltFile = "/models/$alt_view";
$path = $componentPaths['main'];
$altPath = $componentPaths['alt'];
$formats = array($format);
if ($format != 'html')
{
$formats[] = 'raw';
}
foreach ($formats as $currentFormat)
{
$file = $protoFile . '.' . $currentFormat . '.php';
$altFile = $protoAltFile . '.' . $currentFormat . '.php';
// Try to find the proper class in the proper path
if (!class_exists($class_name) && file_exists($path . $file))
{
@include_once $path . $file;
}
// Try to find the proper class in the alternate path
if (!class_exists($class_name) && file_exists($altPath . $file))
{
@include_once $altPath . $file;
}
// Try to find the alternate class in the proper path
if (!class_exists($alt_class) && file_exists($path . $altFile))
{
@include_once $path . $altFile;
}
// Try to find the alternate class in the alternate path
if (!class_exists($alt_class) && file_exists($altPath . $altFile))
{
@include_once $altPath . $altFile;
}
}
// If the alternate class exists just map the class to the alternate
if (!class_exists($class_name) && class_exists($alt_class))
{
$this->class_alias($alt_class, $class_name);
}
// No class found? Map to FOFModel
elseif (!class_exists($class_name))
{
if ($view != 'default')
{
$defaultClass = FOFInflector::camelize($component_raw . '_view_default');
$this->class_alias($defaultClass, $class_name);
}
else
{
if (!file_exists(self::$fofPath . '/view/' . $format . '.php'))
{
$default_class = 'FOFView';
}
else
{
$default_class = 'FOFView' . ucfirst($format);
}
$this->class_alias($default_class, $class_name, true);
}
}
}
/**
* Autoload Tables
*
* @param string $class_name The name of the class to load
*
* @return void
*/
public function autoload_fof_table($class_name)
{
FOFPlatform::getInstance()->logDebug(__METHOD__ . "() autoloading $class_name");
static $isCli = null, $isAdmin = null;
if (is_null($isCli) && is_null($isAdmin))
{
list($isCli, $isAdmin) = FOFDispatcher::isCliAdmin();
}
if (strpos($class_name, 'Table') === false)
{
return;
}
// Change from camel cased into a lowercase array
$class_modified = preg_replace('/(\s)+/', '_', $class_name);
$class_modified = strtolower(preg_replace('/(?<=\\w)([A-Z])/', '_\\1', $class_modified));
$parts = explode('_', $class_modified);
// We need three parts in the name
if (count($parts) != 3)
{
return;
}
// We need the second part to be "model"
if ($parts[1] != 'table')
{
return;
}
// Get the information about this class
$component_raw = $parts[0];
$component = 'com_' . $parts[0];
$view = $parts[2];
// Is this an FOF 2.1 or later component?
if (!$this->isFOFComponent($component))
{
return;
}
// Get the alternate view and class name (opposite singular/plural name)
$alt_view = FOFInflector::isSingular($view) ? FOFInflector::pluralize($view) : FOFInflector::singularize($view);
$alt_class = FOFInflector::camelize($component_raw . '_table_' . $alt_view);
// Get the proper and alternate paths and file names
$componentPaths = FOFPlatform::getInstance()->getComponentBaseDirs($component);
$file = "/tables/$view.php";
$altFile = "/tables/$alt_view.php";
$path = $componentPaths['admin'];
// Try to find the proper class in the proper path
if (file_exists($path . $file))
{
@include_once $path . $file;
}
// Try to find the alternate class in the proper path
if (!class_exists($alt_class) && file_exists($path . $altFile))
{
@include_once $path . $altFile;
}
// If the alternate class exists just map the class to the alternate
if (!class_exists($class_name) && class_exists($alt_class))
{
$this->class_alias($alt_class, $class_name);
}
// No class found? Map to FOFModel
elseif (!class_exists($class_name))
{
if ($view != 'default')
{
$defaultClass = FOFInflector::camelize($component_raw . '_table_default');
$this->class_alias($defaultClass, $class_name);
}
else
{
$this->class_alias('FOFTable', $class_name, true);
}
}
}
/**
* Autoload Helpers
*
* @param string $class_name The name of the class to load
*
* @return void
*/
public function autoload_fof_helper($class_name)
{
FOFPlatform::getInstance()->logDebug(__METHOD__ . "() autoloading $class_name");
static $isCli = null, $isAdmin = null;
if (is_null($isCli) && is_null($isAdmin))
{
list($isCli, $isAdmin) = FOFDispatcher::isCliAdmin();
}
if (strpos($class_name, 'Helper') === false)
{
return;
}
// Change from camel cased into a lowercase array
$class_modified = preg_replace('/(\s)+/', '_', $class_name);
$class_modified = strtolower(preg_replace('/(?<=\\w)([A-Z])/', '_\\1', $class_modified));
$parts = explode('_', $class_modified);
// We need three parts in the name
if (count($parts) != 3)
{
return;
}
// We need the second part to be "model"
if ($parts[1] != 'helper')
{
return;
}
// Get the information about this class
$component_raw = $parts[0];
$component = 'com_' . $parts[0];
$view = $parts[2];
// Is this an FOF 2.1 or later component?
if (!$this->isFOFComponent($component))
{
return;
}
// Get the alternate view and class name (opposite singular/plural name)
$alt_view = FOFInflector::isSingular($view) ? FOFInflector::pluralize($view) : FOFInflector::singularize($view);
$alt_class = FOFInflector::camelize($component_raw . '_helper_' . $alt_view);
// Get the proper and alternate paths and file names
$componentPaths = FOFPlatform::getInstance()->getComponentBaseDirs($component);
$file = "/helpers/$view.php";
$altFile = "/helpers/$alt_view.php";
$path = $componentPaths['main'];
$altPath = $componentPaths['alt'];
// Try to find the proper class in the proper path
if (file_exists($path . $file))
{
@include_once $path . $file;
}
// Try to find the proper class in the alternate path
if (!class_exists($class_name) && file_exists($altPath . $file))
{
@include_once $altPath . $file;
}
// Try to find the alternate class in the proper path
if (!class_exists($alt_class) && file_exists($path . $altFile))
{
@include_once $path . $altFile;
}
// Try to find the alternate class in the alternate path
if (!class_exists($alt_class) && file_exists($altPath . $altFile))
{
@include_once $altPath . $altFile;
}
// If the alternate class exists just map the class to the alternate
if (!class_exists($class_name) && class_exists($alt_class))
{
$this->class_alias($alt_class, $class_name);
}
}
/**
* Autoload Toolbars
*
* @param string $class_name The name of the class to load
*
* @return void
*/
public function autoload_fof_toolbar($class_name)
{
FOFPlatform::getInstance()->logDebug(__METHOD__ . "() autoloading $class_name");
static $isCli = null, $isAdmin = null;
if (is_null($isCli) && is_null($isAdmin))
{
list($isCli, $isAdmin) = FOFDispatcher::isCliAdmin();
}
if (strpos($class_name, 'Toolbar') === false)
{
return;
}
// Change from camel cased into a lowercase array
$class_modified = preg_replace('/(\s)+/', '_', $class_name);
$class_modified = strtolower(preg_replace('/(?<=\\w)([A-Z])/', '_\\1', $class_modified));
$parts = explode('_', $class_modified);
// We need two parts in the name
if (count($parts) != 2)
{
return;
}
// We need the second part to be "model"
if ($parts[1] != 'toolbar')
{
return;
}
// Get the information about this class
$component_raw = $parts[0];
$component = 'com_' . $parts[0];
$platformDirs = FOFPlatform::getInstance()->getPlatformBaseDirs();
// Get the proper and alternate paths and file names
$file = "/components/$component/toolbar.php";
$path = ($isAdmin || $isCli) ? $platformDirs['admin'] : $platformDirs['public'];
$altPath = ($isAdmin || $isCli) ? $platformDirs['public'] : $platformDirs['admin'];
// Try to find the proper class in the proper path
if (file_exists($path . $file))
{
@include_once $path . $file;
}
// Try to find the proper class in the alternate path
if (!class_exists($class_name) && file_exists($altPath . $file))
{
@include_once $altPath . $file;
}
// No class found? Map to FOFToolbar
if (!class_exists($class_name))
{
$this->class_alias('FOFToolbar', $class_name, true);
}
}
/**
* Autoload Fields
*
* @param string $class_name The name of the class to load
*
* @return void
*/
public function autoload_fof_field($class_name)
{
FOFPlatform::getInstance()->logDebug(__METHOD__ . "() autoloading $class_name");
// @todo
}
}