Beispiel #1
0
 /**
  * Set autoload.
  *
  * @return  void
  */
 public function autoload()
 {
     // Load Composer
     include_once dirname(__DIR__) . '/vendor/autoload.php';
     // Load Windwalker framework
     \JLoader::registerNamespace('Windwalker', dirname(__DIR__));
     // Load some file out of nameing standard
     jimport('joomla.filesystem.file');
     jimport('joomla.filesystem.folder');
     jimport('joomla.filesystem.path');
 }
Beispiel #2
0
 public function check()
 {
     jimport('joomla.filesystem.folder');
     $version = (new JVersion())->getShortVersion();
     $fileName = JPATH_COMPONENT_ADMINISTRATOR . '/hashes/' . $version . '_hashes.txt';
     $hashes = $this->getHashes($fileName);
     $files = JFolder::files(JPATH_ROOT, '.', true, true);
     $checksFailed = [];
     $checksAdd = [];
     $skipFolders = ['installation/', '/components/com_jmd5check/'];
     JLoader::registerNamespace('Elkuku', JPATH_LIBRARIES . '/elkuku');
     $md5Checker = new \Elkuku\Md5Check\Md5Check();
     $excludeFolders = ['installation'];
     $result = $md5Checker->checkMD5File($fileName, JPATH_ROOT, $excludeFolders);
     var_dump($result);
     return;
     foreach ($files as $file) {
         foreach ($skipFolders as $skipFolder) {
             if (false !== strpos($file, $skipFolder)) {
                 continue 2;
             }
         }
         if (false == array_key_exists($file, $hashes)) {
             // Superfluous file
             $checksAdd[] = $file;
             continue;
         }
         $md5 = md5_file($file);
         if ($md5 != $hashes[$file]) {
             // The md5 check failed.
             $checksFailed[] = $file;
             unset($hashes[$file]);
             continue;
         }
         // The file is "all right".
         unset($hashes[$file]);
     }
     foreach ($hashes as $file => $hash) {
         foreach ($skipFolders as $skipFolder) {
             if (false !== strpos($file, $skipFolder)) {
                 continue 2;
             }
         }
         $checksMissing[] = $file;
     }
     $view = $this->getView('jmd5check', 'html');
     $view->set('checksFailed', $checksFailed);
     $view->set('checksMissing', $checksMissing);
     $view->set('checksAdd', $checksAdd);
     $view->setLayout('result');
     parent::display();
 }
Beispiel #3
0
 /**
  * Constructor
  *
  * @access      public
  *
  * @param       object $subject The object to observe
  * @param       array  $config  An array that holds the plugin configuration
  *
  * @since       1.6
  */
 public function __construct(&$subject, $config)
 {
     parent::__construct($subject, $config);
     $this->loadLanguage();
     $this->input = $this->app->input;
     // Allow Context
     $this->allow_context = array('com_users.profile', 'com_users.user', 'com_users.registration', 'com_admin.profile', 'com_userxtd.profile', 'com_userxtd.user', 'com_userxtd.registration');
     $UXParams = JComponentHelper::getParams('com_userxtd');
     $this->params->merge($UXParams);
     self::$self = $this;
     // Autoloading
     \JLoader::registerNamespace('Userxtd', __DIR__ . '/src');
 }
 /**
  * Constructor initialize necessary variables
  *
  * @return void
  */
 public function __construct()
 {
     $this->table = $this->getTable();
     $this->params = new JRegistry($this->table->get('params'));
     /*
      * Register the autoloader for the Mautic library
      *
      * Joomla! 3.2 has a native namespace capable autoloader so prefer that and use our fallback loader for older versions
      */
     if (version_compare(JVERSION, '3.2', 'ge')) {
         JLoader::registerNamespace('Mautic', __DIR__ . '/lib');
     } else {
         include_once __DIR__ . '/lib/Mautic/AutoLoader.php';
     }
 }
Beispiel #5
0
<?php

/**
 * A script for intercepting calls to this component and handling them appropriately.
 *
 * @copyright   Copyright (C) 2012-2015 KnowledgeArc Ltd. All rights reserved.
 * @license     GNU General Public License version 2 or later; see LICENSE.txt
 */
defined('_JEXEC') or die('Restricted access');
JLoader::register('JSolrIndexHelper', dirname(__FILE__) . '/helpers/jsolrindex.php');
JLoader::registerNamespace('JSolr', JPATH_PLATFORM);
$JControllerName = class_exists('JControllerLegacy') ? 'JControllerLegacy' : 'JController';
$controller = $JControllerName::getInstance('jsolrindex');
$controller->execute(JRequest::getCmd('task'));
$controller->redirect();
Beispiel #6
0
/**
 * @package      SocialCommunity
 * @subpackage   Libraries
 * @author       Todor Iliev
 * @copyright    Copyright (C) 2015 Todor Iliev <*****@*****.**>. All rights reserved.
 * @license      http://www.gnu.org/copyleft/gpl.html GNU/GPL
 */
// no direct access
defined('_JEXEC') or die;
if (!defined("SOCIALCOMMUNITY_PATH_COMPONENT_ADMINISTRATOR")) {
    define("SOCIALCOMMUNITY_PATH_COMPONENT_ADMINISTRATOR", JPATH_ADMINISTRATOR . "/components/com_socialcommunity");
}
if (!defined("SOCIALCOMMUNITY_PATH_COMPONENT_SITE")) {
    define("SOCIALCOMMUNITY_PATH_COMPONENT_SITE", JPATH_SITE . "/components/com_socialcommunity");
}
if (!defined("SOCIALCOMMUNITY_PATH_LIBRARY")) {
    define("SOCIALCOMMUNITY_PATH_LIBRARY", JPATH_LIBRARIES . "/socialcommunity");
}
JLoader::registerNamespace('SocialCommunity', JPATH_LIBRARIES);
// Register helpers
JLoader::register("SocialCommunityHelper", SOCIALCOMMUNITY_PATH_COMPONENT_ADMINISTRATOR . "/helpers/socialcommunity.php");
JLoader::register("SocialCommunityHelperRoute", SOCIALCOMMUNITY_PATH_COMPONENT_SITE . "/helpers/route.php");
// Register Observers
JLoader::register("SocialCommunityObserverProfile", SOCIALCOMMUNITY_PATH_COMPONENT_ADMINISTRATOR . "/tables/observers/profile.php");
JObserverMapper::addObserverClassToClass('SocialCommunityObserverProfile', 'SocialCommunityTableProfile', array('typeAlias' => 'com_socialcommunity.profile'));
// Include HTML helpers path
JHtml::addIncludePath(SOCIALCOMMUNITY_PATH_COMPONENT_SITE . '/helpers/html');
// Load library language
$lang = JFactory::getLanguage();
$lang->load('lib_socialcommunity', SOCIALCOMMUNITY_PATH_LIBRARY);
Beispiel #7
0
 private static function getConfig($params)
 {
     JLoader::registerNamespace('JSolr', JPATH_PLATFORM);
     $class = '\\JSolr\\Index\\Factory';
     if ($params->get('service') == 1) {
         $class = '\\JSolr\\Search\\Factory';
     }
     return $class::getConfig();
 }
 /**
  * This method is called before the first test of this test class is run.
  */
 public static function setUpBeforeClass()
 {
     \JLoader::registerNamespace('EventStub', __DIR__);
 }
<?php

/**
 * @package      Gamification
 * @subpackage   Initializator
 * @author       Todor Iliev
 * @copyright    Copyright (C) 2016 Todor Iliev <*****@*****.**>. All rights reserved.
 * @license      GNU General Public License version 3 or later; see LICENSE.txt
 */
defined('JPATH_PLATFORM') or die;
if (!defined('GAMIFICATION_PATH_COMPONENT_ADMINISTRATOR')) {
    define('GAMIFICATION_PATH_COMPONENT_ADMINISTRATOR', JPATH_ADMINISTRATOR . '/components/com_gamification');
}
if (!defined('GAMIFICATION_PATH_COMPONENT_SITE')) {
    define('GAMIFICATION_PATH_COMPONENT_SITE', JPATH_SITE . '/components/com_gamification');
}
if (!defined('GAMIFICATION_PATH_LIBRARY')) {
    define('GAMIFICATION_PATH_LIBRARY', JPATH_LIBRARIES . '/Gamification');
}
JLoader::registerNamespace('Gamification', JPATH_LIBRARIES);
// Register helpers
JLoader::register('GamificationHelper', GAMIFICATION_PATH_COMPONENT_ADMINISTRATOR . '/helpers/gamification.php');
JLoader::register('GamificationHelperRoute', GAMIFICATION_PATH_COMPONENT_SITE . '/helpers/route.php');
// Include HTML helpers path
JHtml::addIncludePath(GAMIFICATION_PATH_COMPONENT_SITE . '/helpers/html');
// Load library language.
$lang = JFactory::getLanguage();
$lang->load('lib_gamification', GAMIFICATION_PATH_COMPONENT_SITE);
JLog::addLogger(array('text_file' => 'com_gamification.errors.php'), JLog::CRITICAL + JLog::EMERGENCY + JLog::ALERT + JLog::ERROR, array('com_gamification'));
Beispiel #10
0
 * @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPL
 */
defined('_JEXEC') or die;
// Access check.
if (!JFactory::getUser()->authorise('core.manage', 'com_jem')) {
    return JError::raiseWarning(404, JText::_('JERROR_ALERTNOAUTHOR'));
}
JHtml::_('behavior.tabstate');
// Require classes
require_once JPATH_COMPONENT_SITE . '/helpers/helper.php';
require_once JPATH_COMPONENT_SITE . '/helpers/countries.php';
require_once JPATH_COMPONENT_SITE . '/classes/image.class.php';
require_once JPATH_COMPONENT_SITE . '/classes/output.class.php';
require_once JPATH_COMPONENT_SITE . '/classes/user.class.php';
require_once JPATH_COMPONENT_SITE . '/classes/attachment.class.php';
require_once JPATH_COMPONENT_SITE . '/classes/categories.class.php';
require_once JPATH_COMPONENT_ADMINISTRATOR . '/classes/admin.class.php';
require_once JPATH_COMPONENT_ADMINISTRATOR . '/helpers/helper.php';
// load recurrence files
JLoader::registerNamespace('Recurr', JPATH_COMPONENT_SITE . '/classes');
// Set the table directory
JTable::addIncludePath(JPATH_COMPONENT . '/tables');
// perform cleanup if it wasn't done today (archive, delete, recurrence)
JemHelper::cleanup();
// Get an instance of the controller
$controller = JControllerLegacy::getInstance('Jem');
// Perform the Request task
$input = JFactory::getApplication()->input;
$controller->execute($input->getCmd('task'));
// Redirect if set by the controller
$controller->redirect();
Beispiel #11
0
if (!defined('JPATH_PLATFORM')) {
    define('JPATH_PLATFORM', __DIR__);
}
// Import the library loader if necessary.
if (!class_exists('JLoader')) {
    require_once JPATH_PLATFORM . '/loader.php';
}
// Make sure that the Joomla Platform has been successfully loaded.
if (!class_exists('JLoader')) {
    throw new RuntimeException('Joomla Platform not loaded.');
}
// Register the library base path for CMS libraries.
JLoader::registerPrefix('J', JPATH_PLATFORM . '/cms', false, true);
// Register PHP namespaces
JLoader::registerNamespace('Joomla', JPATH_PLATFORM . '/framework');
JLoader::registerNamespace('Symfony', JPATH_PLATFORM . '/framework');
// Register the class aliases for Framework classes that have replaced their Platform equivilents
require_once __DIR__ . '/classmap.php';
// Register a handler for uncaught exceptions that shows a pretty error page when possible
set_exception_handler(array('JErrorPage', 'render'));
// Define the Joomla version if not already defined.
if (!defined('JVERSION')) {
    $jversion = new JVersion();
    define('JVERSION', $jversion->getShortVersion());
}
// Set up the message queue logger for web requests
if (array_key_exists('REQUEST_METHOD', $_SERVER)) {
    JLog::addLogger(array('logger' => 'messagequeue'), JLog::ALL, array('jerror'));
}
// Register classes where the names have been changed to fit the autoloader rules
// @deprecated  4.0
 /**
  * Set autoload.
  *
  * @return  void
  */
 public function autoload()
 {
     static $loaded = false;
     if ($loaded) {
         return;
     }
     // Load Composer
     include_once dirname(__DIR__) . '/vendor/autoload.php';
     // Load Windwalker framework
     \JLoader::registerNamespace('Windwalker', dirname(__DIR__));
     // Load some file out of nameing standard
     jimport('joomla.filesystem.file');
     jimport('joomla.filesystem.folder');
     jimport('joomla.filesystem.path');
     // Aliases
     class_alias('Windwalker\\Router\\CmsRoute', 'Windwalker\\Router\\Route');
     $loaded = true;
 }
Beispiel #13
0
// Maximise error reporting.
error_reporting(E_ALL);
ini_set('display_errors', 1);
// Define expected Joomla constants.
define('_JEXEC', 1);
define('DS', DIRECTORY_SEPARATOR);
// retrieve joomla destination from properties file.
$properties = parse_ini_file(dirname(dirname(dirname(__FILE__))) . '/build.properties');
// Load Joomla framework
define('JPATH_BASE', $properties['dest']);
require_once JPATH_BASE . '/includes/defines.php';
require_once JPATH_BASE . '/includes/framework.php';
jimport('joomla.filesystem.path');
jimport('joomla.log.log');
jimport('joomla.environment.request');
jimport('joomla.session.session');
$_SERVER['HTTP_HOST'] = 'http://localhost';
$_SERVER['REQUEST_URI'] = '/index.php';
//$_SERVER['REMOTE_ADDR'] = '127.0.0.1';
$app = JFactory::getApplication('site');
$app->set('build.properties', $properties);
if (!defined('JSPACEPATH_TESTS')) {
    define('JSPACEPATH_TESTS', dirname(__FILE__));
}
// Set error handling.
JError::setErrorHandling(E_NOTICE, 'ignore');
JError::setErrorHandling(E_WARNING, 'ignore');
JError::setErrorHandling(E_ERROR, 'ignore');
require_once JPATH_PLATFORM . '/loader.php';
JLoader::registerNamespace('JSolr', dirname(dirname(dirname(__FILE__))) . '/libraries');
 * @pacakge  Joomla.Platform.Namespace.Example
 * 
 * @since   0.1
 * 
 * @link http://www.terrachaos.net TerraChaos Development Network
 * 
 * @copyright  Copyright (C) 2011 - 2013 TerraChaosStudios. All rights reserved.
 * @license    GNU General Public License version 2 or later; see LICENSE
 * 
 */
// Bootstrap J! Platform
$root = dirname(__FILE__) . '/../../../..';
require_once $root . '/lib/joomla/libraries/import.php';
// Setup autoloader & import core namespaces.
\JLoader::setup(\JLoader::NATURAL_CASE, true);
\JLoader::registerNamespace('Table', dirname(__FILE__) . '/table');
// Instantiate the main controller.
$controller = new \Table\Controller();
if (!defined('JPATH_SITE')) {
    define('JPATH_SITE', dirname(__FILE__));
}
//$controller->run();
class Module
{
    public function __construct()
    {
    }
    public function run()
    {
        $controller = new \Table\Controller();
        $controller->run();
    public static function getAsposeFiles()
    {
        $module_path = dirname(__FILE__);
        JLoader::registerNamespace('Aspose', $module_path . '/Aspose_Cloud_SDK_For_PHP-master/src');
        $jAp = JFactory::getApplication();
        $myJoomlaInput = $jAp->input;
        // Get Module Configurations
        $module_params = static::getParams();
        // Set Application ID and Application Key for Aspose SDK
        $app_id = $module_params->get('pdf_importer_app_sid', false);
        $app_key = $module_params->get('pdf_importer_app_key', false);
        \Aspose\Cloud\Common\AsposeApp::$appSID = $app_id;
        \Aspose\Cloud\Common\AsposeApp::$appKey = $app_key;
        /*
         * Assign Base Product URL
         */
        \Aspose\Cloud\Common\Product::$baseProductUri = 'http://api.aspose.com/v1.1';
        if (isset($_REQUEST['aspose_folder']) && !empty($_REQUEST['aspose_folder'])) {
            $aspose_folder = $_REQUEST['aspose_folder'];
        } else {
            $aspose_folder = '';
        }
        $folder = new \Aspose\Cloud\Storage\Folder();
        $files = $folder->getFilesList($aspose_folder);
        $asposeFolders = array();
        $asposeFiles = array();
        $options = '<option> --- Select Folder --- </option>';
        $aspose_files_rows = "\n    <tr>\n                    <td width=\"5%\"> </td>\n\t\t\t\t\t<td width=\"95%\" ><strong> File Name </strong> </td>\n\n                  </tr>\n";
        foreach ($files as $file) {
            if ($file->IsFolder == '1') {
                array_push($asposeFolders, $file->Name);
                $options .= '<option value="' . $file->Name . '">' . $file->Name . '</option>';
            } else {
                array_push($asposeFiles, $file->Name);
                if ($aspose_folder != '') {
                    $aspose_folder = $aspose_folder . '/';
                }
                $aspose_files_rows .= '
            <tr>
                <td> <input type="radio" name="aspose_filename" value="' . $aspose_folder . $file->Name . '" /> </td>
                <td> ' . $file->Name . ' </td>
            </tr>
        ';
            }
        }
        if (is_array($asposeFolders) && count($asposeFolders) > 0) {
            $select_aspose_folder = '<select name="aspose_folder_name" id="aspose_folder_name">';
            $select_aspose_folder .= $options;
            $select_aspose_folder .= '</select>';
        } else {
            $select_aspose_folder = '';
        }
        if (count($asposeFiles) < 1) {
            $aspose_files_rows = '
        <tr>
            <td colspan="2"> No Files Found. </td>
        </tr>
    ';
        }
        $result = '<tr>
		<td>' . $select_aspose_folder . '</td>
		</tr>
		<tr>
		<td>
		 <table id="bucket_files" cellspacing="8" width="100%">
		    ' . $aspose_files_rows . '
		 </table>
		</td>
		</tr>
	';
        return $result;
    }
 * @subpackage   Initialization
 * @author       Todor Iliev
 * @copyright    Copyright (C) 2016 Todor Iliev <*****@*****.**>. All rights reserved.
 * @license      GNU General Public License version 3 or later; see LICENSE.txt
 */
defined('JPATH_PLATFORM') or die;
if (!defined('PRISM_PATH_LIBRARY')) {
    define('PRISM_PATH_LIBRARY', JPATH_LIBRARIES . '/Prism');
}
jimport('joomla.filesystem.file');
jimport('joomla.filesystem.folder');
jimport('joomla.filesystem.path');
JLoader::registerNamespace('Abraham', PRISM_PATH_LIBRARY . '/libs');
JLoader::registerNamespace('AdamPaterson', PRISM_PATH_LIBRARY . '/libs');
JLoader::registerNamespace('Carbon', PRISM_PATH_LIBRARY . '/libs');
JLoader::registerNamespace('Coinbase', PRISM_PATH_LIBRARY . '/libs');
JLoader::registerNamespace('Defuse', PRISM_PATH_LIBRARY . '/libs');
JLoader::registerNamespace('Facebook', PRISM_PATH_LIBRARY . '/libs');
JLoader::registerNamespace('Google', PRISM_PATH_LIBRARY . '/libs');
JLoader::registerNamespace('JmesPath', PRISM_PATH_LIBRARY . '/libs');
JLoader::registerNamespace('League', PRISM_PATH_LIBRARY . '/libs');
JLoader::registerNamespace('Monolog', PRISM_PATH_LIBRARY . '/libs');
JLoader::registerNamespace('Prism', JPATH_LIBRARIES);
JLoader::registerNamespace('Psr', PRISM_PATH_LIBRARY . '/libs');
JLoader::registerNamespace('RandomLib', PRISM_PATH_LIBRARY . '/libs');
JLoader::registerNamespace('SecurityLib', PRISM_PATH_LIBRARY . '/libs');
// Register some helpers.
JHtml::addIncludePath(PRISM_PATH_LIBRARY . '/ui/helpers');
// Load library language.
$lang = JFactory::getLanguage();
$lang->load('lib_prism', PRISM_PATH_LIBRARY);
Beispiel #17
0
<?php

/**
 * Part of ihealth project. 
 *
 * @copyright  Copyright (C) 2011 - 2014 SMS Taiwan, Inc. All rights reserved.
 * @license    GNU General Public License version 2 or later; see LICENSE
 */
JLoader::registerNamespace('Astra', __DIR__);
JLoader::registerNamespace('TplLyrasoft', __DIR__);
return \TplLyrasoft\LyrasoftTemplate::getInstance()->init($this, $this->params);
Beispiel #18
0
<?php

/**
* @package      CrowdfundingData
* @subpackage   Library
* @author       Todor Iliev
* @copyright    Copyright (C) 2014 Todor Iliev <*****@*****.**>. All rights reserved.
* @license      http://www.gnu.org/copyleft/gpl.html GNU/GPL
*/
defined('JPATH_PLATFORM') or die;
if (!defined("CROWDFUNDINGDATA_PATH_COMPONENT_ADMINISTRATOR")) {
    define("CROWDFUNDINGDATA_PATH_COMPONENT_ADMINISTRATOR", JPATH_ADMINISTRATOR . "/components/com_crowdfundingdata");
}
if (!defined("CROWDFUNDINGDATA_PATH_COMPONENT_SITE")) {
    define("CROWDFUNDINGDATA_PATH_COMPONENT_SITE", JPATH_SITE . "/components/com_crowdfundingdata");
}
if (!defined("CROWDFUNDINGDATA_PATH_LIBRARY")) {
    define("CROWDFUNDINGDATA_PATH_LIBRARY", JPATH_LIBRARIES . "/CrowdfundingData");
}
JLoader::registerNamespace('CrowdfundingData', JPATH_LIBRARIES);
// Register helpers
JLoader::register("CrowdfundingDataHelper", CROWDFUNDINGDATA_PATH_COMPONENT_ADMINISTRATOR . "/helpers/crowdfundingdata.php");
// Register HTML helpers
JHtml::addIncludePath(CROWDFUNDINGDATA_PATH_COMPONENT_SITE . "/helpers/html");
JLoader::register('JHtmlString', JPATH_LIBRARIES . "/joomla/html/html/string.php");
Beispiel #19
0
/**
 * NoNumber Framework Helper File: Assignments: Geo
 *
 * @package         NoNumber Framework
 * @version         15.9.13613
 *
 * @author          Peter van Westen <*****@*****.**>
 * @link            http://www.nonumber.nl
 * @copyright       Copyright © 2015 NoNumber All Rights Reserved
 * @license         http://www.gnu.org/licenses/gpl-2.0.html GNU/GPL
 */
defined('_JEXEC') or die;
if (is_dir(JPATH_LIBRARIES . '/geoip')) {
    JLoader::registerNamespace('GeoIp2', JPATH_LIBRARIES . '/geoip');
    JLoader::registerNamespace('MaxMind', JPATH_LIBRARIES . '/geoip');
}
use GeoIp2\GeoIp;
require_once JPATH_PLUGINS . '/system/nnframework/helpers/assignment.php';
class NNFrameworkAssignmentsGeo extends NNFrameworkAssignment
{
    var $geo = null;
    /**
     * passContinents
     */
    function passContinents()
    {
        if (!$this->getGeo() || empty($this->geo->continentCode)) {
            return $this->pass(false);
        }
        return $this->passSimple($this->geo->continentCode);
Beispiel #20
0
<?php

/**
 * @package      Prism
 * @subpackage   Initialization
 * @author       Todor Iliev
 * @copyright    Copyright (C) 2015 Todor Iliev <*****@*****.**>. All rights reserved.
 * @license      GNU General Public License version 3 or later; see LICENSE.txt
 */
defined('JPATH_PLATFORM') or die;
if (!defined('PRISM_PATH_LIBRARY')) {
    define('PRISM_PATH_LIBRARY', JPATH_LIBRARIES . '/Prism');
}
jimport('joomla.filesystem.file');
jimport('joomla.filesystem.folder');
jimport('joomla.filesystem.path');
JLoader::registerNamespace('Prism', JPATH_LIBRARIES);
// Register some helpers.
JHtml::addIncludePath(PRISM_PATH_LIBRARY . '/ui/helpers');
// Load library language.
$lang = JFactory::getLanguage();
$lang->load('lib_prism', PRISM_PATH_LIBRARY);
/**
 * @package      Prism
 * @subpackage   Initialization
 * @author       Todor Iliev
 * @copyright    Copyright (C) 2016 Todor Iliev <*****@*****.**>. All rights reserved.
 * @license      GNU General Public License version 3 or later; see LICENSE.txt
 */
defined('JPATH_PLATFORM') or die;
if (!defined('PRISM_PATH_LIBRARY')) {
    define('PRISM_PATH_LIBRARY', JPATH_LIBRARIES . '/Prism');
}
jimport('joomla.filesystem.file');
jimport('joomla.filesystem.folder');
jimport('joomla.filesystem.path');
JLoader::registerNamespace('Aws', PRISM_PATH_LIBRARY . '/libs');
JLoader::registerNamespace('Defuse', PRISM_PATH_LIBRARY . '/libs');
JLoader::registerNamespace('Prism', JPATH_LIBRARIES);
JLoader::registerNamespace('League', PRISM_PATH_LIBRARY . '/libs');
JLoader::registerNamespace('Psr', PRISM_PATH_LIBRARY . '/libs');
JLoader::registerNamespace('GuzzleHttp', PRISM_PATH_LIBRARY . '/libs');
JLoader::registerNamespace('JmesPath', PRISM_PATH_LIBRARY . '/libs');
JLoader::registerNamespace('OAuth2', PRISM_PATH_LIBRARY . '/libs');
JLoader::registerNamespace('RandomLib', PRISM_PATH_LIBRARY . '/libs');
JLoader::registerNamespace('SecurityLib', PRISM_PATH_LIBRARY . '/libs');
JLoader::registerNamespace('AdamPaterson', PRISM_PATH_LIBRARY . '/libs');
JLoader::registerNamespace('Carbon', PRISM_PATH_LIBRARY . '/libs');
// Register some helpers.
JHtml::addIncludePath(PRISM_PATH_LIBRARY . '/ui/helpers');
// Load library language.
$lang = JFactory::getLanguage();
$lang->load('lib_prism', PRISM_PATH_LIBRARY);
Beispiel #22
0
<?php

/**
 * @package    PatchTester
 *
 * @copyright  Copyright (C) 2011 - 2012 Ian MacLennan, Copyright (C) 2013 - 2015 Open Source Matters, Inc. All rights reserved.
 * @license    GNU General Public License version 2 or later
 */
defined('_JEXEC') or die;
// Access check.
if (!JFactory::getUser()->authorise('core.manage', 'com_patchtester')) {
    return JError::raiseWarning(404, JText::_('JERROR_ALERTNOAUTHOR'));
}
// Application reference
$app = JFactory::getApplication();
// Register the component namespace to the autoloader
JLoader::registerNamespace('PatchTester', __DIR__);
// Build the controller class name based on task
$task = $app->input->getCmd('task', 'display');
// If $task is an empty string, apply our default since JInput might not
if ($task === '') {
    $task = 'display';
}
$class = '\\PatchTester\\Controller\\' . ucfirst(strtolower($task)) . 'Controller';
// Instantiate and execute the controller
$controller = new $class($app->input, $app);
$controller->execute();
Beispiel #23
0
<?php

/**
 * @package      ItpMeta
 * @subpackage   Initializator
 * @author       Todor Iliev
 * @copyright    Copyright (C) 2015 Todor Iliev <*****@*****.**>. All rights reserved.
 * @license      GNU General Public License version 3 or later; see LICENSE.txt
 */
defined('JPATH_PLATFORM') or die;
if (!defined('ITPMETA_PATH_COMPONENT_ADMINISTRATOR')) {
    define('ITPMETA_PATH_COMPONENT_ADMINISTRATOR', JPATH_ADMINISTRATOR . '/components/com_itpmeta');
}
if (!defined('ITPMETA_PATH_COMPONENT_SITE')) {
    define('ITPMETA_PATH_COMPONENT_SITE', JPATH_SITE . '/components/com_itpmeta');
}
if (!defined('ITPMETA_PATH_LIBRARY')) {
    define('ITPMETA_PATH_LIBRARY', JPATH_LIBRARIES . '/Itpmeta');
}
JLoader::registerNamespace('Itpmeta', JPATH_LIBRARIES);
// Register component helpers
JLoader::register('ItpMetaHelper', ITPMETA_PATH_COMPONENT_ADMINISTRATOR . '/helpers/itpmeta.php');
// Load HTML helper
JHtml::addIncludePath(ITPMETA_PATH_COMPONENT_ADMINISTRATOR . '/helpers/html');
// Load library language
$lang = JFactory::getLanguage();
$lang->load('lib_itpmeta', ITPMETA_PATH_COMPONENT_SITE);
 /**
  * Tests the exception thrown by the JLoader::registerNamespace method.
  *
  * @return  void
  *
  * @since   12.3
  * @expectedException  RuntimeException
  */
 public function testRegisterNamespaceException()
 {
     JLoader::registerNamespace('Color', 'dummy');
 }
<?php

/**
 * @package      Crowdfundingfinance
 * @subpackage   Libraries
 * @author       Todor Iliev
 * @copyright    Copyright (C) 2016 Todor Iliev <*****@*****.**>. All rights reserved.
 * @license      GNU General Public License version 3 or later; see LICENSE.txt
 */
defined('JPATH_PLATFORM') or die;
if (!defined('CROWDFUNDINGFINANCE_PATH_COMPONENT_ADMINISTRATOR')) {
    define('CROWDFUNDINGFINANCE_PATH_COMPONENT_ADMINISTRATOR', JPATH_ADMINISTRATOR . DIRECTORY_SEPARATOR . 'components' . DIRECTORY_SEPARATOR . 'com_crowdfundingfinance');
}
if (!defined('CROWDFUNDINGFINANCE_PATH_COMPONENT_SITE')) {
    define('CROWDFUNDINGFINANCE_PATH_COMPONENT_SITE', JPATH_SITE . DIRECTORY_SEPARATOR . 'components' . DIRECTORY_SEPARATOR . 'com_crowdfundingfinance');
}
if (!defined('CROWDFUNDINGFINANCE_PATH_LIBRARY')) {
    define('CROWDFUNDINGFINANCE_PATH_LIBRARY', JPATH_LIBRARIES . DIRECTORY_SEPARATOR . 'crowdfundingfinance');
}
JLoader::registerNamespace('Crowdfundingfinance', JPATH_LIBRARIES);
// Register some helpers
JLoader::register('CrowdfundingfinanceHelper', CROWDFUNDINGFINANCE_PATH_COMPONENT_ADMINISTRATOR . DIRECTORY_SEPARATOR . 'helpers' . DIRECTORY_SEPARATOR . 'crowdfundingfinance.php');
JLoader::register('CrowdfundingfinanceHelperRoute', CROWDFUNDINGFINANCE_PATH_COMPONENT_SITE . DIRECTORY_SEPARATOR . 'helpers' . DIRECTORY_SEPARATOR . 'route.php');
// Include HTML helpers path
JHtml::addIncludePath(CROWDFUNDINGFINANCE_PATH_COMPONENT_SITE . DIRECTORY_SEPARATOR . 'helpers' . DIRECTORY_SEPARATOR . 'html');
Beispiel #26
0
 public function getDatesBetween(DateTime $startDate = null, DateTime $endDate = null, $extend = false, $inc = false)
 {
     //working with a local copy so we don't have to track dates when used multiple time
     $rrule = clone $this;
     if (isset($startDate)) {
         $rrule->dtstart = strftime('%Y%m%dT000000Z', $startDate->getTimestamp());
     } else {
         //format the unix epoch
         $rrule->dtstart = strftime('%Y%m%dT000000Z', $rrule->dtstart);
     }
     if (!isset($endDate) || isset($rrule->until) && $rrule->until < strtotime($endDate->getTimestamp()) && !$extend) {
         $rrule->until = strftime('%Y%m%dT000000Z', $rrule->until);
     } else {
         $rrule->until = strftime('%Y%m%dT000000Z', $endDate->getTimestamp());
         //strftime('%Y%m%d',$endDate);
     }
     $rrule_string = $rrule->toString();
     //get the number of dates in the billing period based on the recurrence and the start date.
     $timezone = JFactory::getConfig()->get('offset');
     //use the event start date $this->state->get('event.rrule.dtstart');
     //$startDate   = new \DateTime(strftime('%Y%m%d',$datestart), new \DateTimeZone($timezone));
     //use the event end date $this->state->get('event.rrule.until');
     //$endDate     = new \DateTime(strftime('%Y%m%d',$datestop), new \DateTimeZone($timezone)); // Optional
     JLoader::registerNamespace('Recurr', JPATH_LIBRARIES);
     JLoader::registerNamespace('Doctrine', JPATH_LIBRARIES);
     $rule = new Recurr\Rule($rrule_string, $startDate, $endDate, $timezone);
     $transformer = new Recurr\Transformer\ArrayTransformer();
     if (isset($startDate)) {
         $constraint = new Recurr\Transformer\Constraint\AfterConstraint($startDate, true);
     } else {
         $constraint = null;
     }
     $dateCollection = $transformer->transform($rule, 30, $constraint);
     return $dateCollection;
 }
Beispiel #27
0
<?php

/**
 * Part of Component Userxtd files.
 *
 * @copyright   Copyright (C) 2014 Asikart. All rights reserved.
 * @license     GNU General Public License version 2 or later; see LICENSE.txt
 */
// No direct access
defined('_JEXEC') or die;
include_once JPATH_LIBRARIES . '/windwalker/src/init.php';
JLoader::registerPrefix('Userxtd', JPATH_BASE . '/components/com_userxtd');
JLoader::registerNamespace('Userxtd', JPATH_ADMINISTRATOR . '/components/com_userxtd/src');
JLoader::registerNamespace('Windwalker', __DIR__);
JLoader::register('UserxtdComponent', JPATH_BASE . '/components/com_userxtd/component.php');
// UserXTD API
\JLoader::register('UXFactory', __DIR__ . '/Class/factory.php');
// CCK
$container = \Windwalker\DI\Container::getInstance('com_userxtd');
$container->registerServiceProvider(new \Windwalker\CCK\CCKProvider());
Beispiel #28
0
<?php

/**
 * @version     1.0.0
 * @package     com_framework
 * @copyright   Copyright (C) 2014. All rights reserved.
 * @license     MIT
 */
// no direct access
defined('_JEXEC') or die;
const COMPONENT_ROOT = __DIR__;
JLoader::registerNamespace('Framework', __DIR__ . '/src');
$app = JFactory::getApplication();
// Set the default view
$app->input->def('view', 'list');
$container = new Joomla\DI\Container();
$container->set('JApplicationCms', $app);
$container->set('JInput', $app->input);
$container->set('JDatabaseDriver', JFactory::getDbo());
echo (new Framework\Dispatcher($app, $container))->execute();
<?php

/**
 * @package      Prism
 * @subpackage   Payment\iDEAL
 * @author       Todor Iliev
 * @copyright    Copyright (C) 2016 Todor Iliev <*****@*****.**>. All rights reserved.
 * @license      GNU General Public License version 3 or later; see LICENSE.txt
 */
// no direct access
defined('JPATH_PLATFORM') or die;
JLoader::registerNamespace('GuzzleHttp', PRISM_PATH_LIBRARY . '/libs');
JLoader::import('Prism.libs.GuzzleHttp.Promise.functions');
JLoader::import('Prism.libs.GuzzleHttp.Psr7.functions');
JLoader::import('Prism.libs.GuzzleHttp.functions');
Beispiel #30
0
/**
 * Part of Ezset project.
 *
 * @copyright  Copyright (C) 2011 - 2014 SMS Taiwan, Inc. All rights reserved.
 * @license    GNU General Public License version 2 or later; see LICENSE
 */
$wwInit = JPATH_LIBRARIES . '/windwalker/src/init.php';
if (is_file($wwInit)) {
    include_once $wwInit;
} else {
    return false;
}
define('EZSET_FRONT', JPATH_ROOT . '/ezset');
define('EZSET_ROOT', realpath(__DIR__ . '/..'));
include_once EZSET_ROOT . '/lib/autoload.php';
if (is_dir(EZSET_FRONT . '/src')) {
    \JLoader::registerNamespace('MyEzset', EZSET_FRONT . '/src');
}
\JLoader::registerNamespace('Ezset', EZSET_ROOT . '/src');
// Include frontend composer
if (is_file(EZSET_FRONT . '/vendor/autoload.php')) {
    include_once EZSET_FRONT . '/vendor/autoload.php';
}
// Register ezset event listeners
Windwalker\Event\ListenerHelper::registerListeners('MyEzset', JEventDispatcher::getInstance(), EZSET_FRONT . '/src/MyEzset/Listener');
// Include custom init.php
if (is_file(EZSET_FRONT . '/src/init.php')) {
    include_once EZSET_FRONT . '/src/init.php';
}
return true;