当前位置: 首页>>代码示例>>PHP>>正文


PHP ClassLoader::addNamespace方法代码示例

本文整理汇总了PHP中ClassLoader::addNamespace方法的典型用法代码示例。如果您正苦于以下问题:PHP ClassLoader::addNamespace方法的具体用法?PHP ClassLoader::addNamespace怎么用?PHP ClassLoader::addNamespace使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在ClassLoader的用法示例。


在下文中一共展示了ClassLoader::addNamespace方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: __construct

 public function __construct()
 {
     parent::__construct();
     $this->import('Config');
     // Load required translation-fields classes
     \ClassLoader::addNamespace('TranslationFields');
     \ClassLoader::addClass('TranslationFields\\TranslationFieldsWidgetHelper', 'system/modules/translation-fields/classes/TranslationFieldsWidgetHelper.php');
     \ClassLoader::addClass('TranslationFields\\TranslationFieldsModel', 'system/modules/translation-fields/models/TranslationFieldsModel.php');
     \ClassLoader::register();
 }
开发者ID:craffft,项目名称:contao-accountmail,代码行数:10,代码来源:Updater.php

示例2: __construct

 public function __construct()
 {
     parent::__construct();
     // Disable debug mode
     $GLOBALS['TL_CONFIG']['debugMode'] = false;
     // Load required classes
     \ClassLoader::addNamespace('Photoalbums2');
     \ClassLoader::addClass('Photoalbums2\\Updater', 'system/modules/photoalbums2/classes/Updater.php');
     \ClassLoader::register();
     // Load updater
     $this->import('\\Photoalbums2\\Updater', 'Updater');
 }
开发者ID:craffft,项目名称:contao-photoalbums2,代码行数:12,代码来源:_runonce.php

示例3:

<?php

/**
 * mobile_menu extension for Contao Open Source CMS
 *
 * Copyright (C) 2011-2014 Codefog
 *
 * @package mobile_menu
 * @author  Codefog <http://codefog.pl>
 * @author  Kamil Kuzminski <kamil.kuzminski@codefog.pl>
 * @license LGPL
 */
/**
 * Register the namespace
 */
ClassLoader::addNamespace('Codefog\\MobileMenu');
/**
 * Register the classes
 */
ClassLoader::addClasses(array('Codefog\\MobileMenu\\MobileMenuModule' => 'system/modules/mobile_menu/src/MobileMenuModule.php'));
/**
 * Register the templates
 */
TemplateLoader::addFiles(array('mod_mobile_menu' => 'system/modules/mobile_menu/templates/modules'));
开发者ID:christianbarkowsky,项目名称:contao-mobile_menu,代码行数:24,代码来源:autoload.php

示例4:

<?php

/**
 * widget_tree_picker extension for Contao Open Source CMS
 *
 * Copyright (C) 2014 Codefog
 *
 * @package widget_tree_picker
 * @author  Codefog <http://codefog.pl>
 * @author  Kamil Kuzminski <kamil.kuzminski@codefog.pl>
 * @license LGPL
 */
/**
 * Register the namespace
 */
ClassLoader::addNamespace('TreePicker');
/**
 * Register the classes
 */
ClassLoader::addClasses(array('TreePicker\\TreePickerHelper' => 'system/modules/widget_tree_picker/classes/TreePickerHelper.php', 'TreePicker\\WidgetTreePicker' => 'system/modules/widget_tree_picker/widgets/WidgetTreePicker.php', 'TreePicker\\WidgetTreeSelector' => 'system/modules/widget_tree_picker/widgets/WidgetTreeSelector.php'));
开发者ID:codefog,项目名称:contao-widget_tree_picker,代码行数:20,代码来源:autoload.php

示例5:

<?php

/**
 * twitter_widgets extension for Contao Open Source CMS
 *
 * Copyright (C) 2013 Codefog
 *
 * @package twitter_widgets
 * @author  Codefog <http://codefog.pl>
 * @author  Kamil Kuzminski <kamil.kuzminski@codefog.pl>
 * @license LGPL
 */
/**
 * Register a custom namespace
 */
ClassLoader::addNamespace('Twitter');
/**
 * Register the classes
 */
ClassLoader::addClasses(array('Twitter\\Twitter' => 'system/modules/twitter_widgets/classes/Twitter.php', 'Twitter\\TwitterHybrid' => 'system/modules/twitter_widgets/classes/TwitterHybrid.php', 'Twitter\\TwitterShareButton' => 'system/modules/twitter_widgets/hybrids/TwitterShareButton.php', 'Twitter\\TwitterFollowButton' => 'system/modules/twitter_widgets/hybrids/TwitterFollowButton.php', 'Twitter\\TwitterTagButton' => 'system/modules/twitter_widgets/hybrids/TwitterTagButton.php', 'Twitter\\TwitterMentionButton' => 'system/modules/twitter_widgets/hybrids/TwitterMentionButton.php', 'Twitter\\TwitterCustomWidget' => 'system/modules/twitter_widgets/hybrids/TwitterCustomWidget.php'));
/**
 * Register the templates
 */
TemplateLoader::addFiles(array('twitter_default' => 'system/modules/twitter_widgets/templates'));
开发者ID:codefog,项目名称:contao-twitter_widgets,代码行数:24,代码来源:autoload.php

示例6:

<?php

ClassLoader::addNamespace('MaeEventCategories');
ClassLoader::addClasses(array('MaeEventCategories\\MaeEvent' => 'system/modules/mae_event_categories/classes/MaeEvent.php', 'MaeEventCategories\\MaeEventBe' => 'system/modules/mae_event_categories/classes/MaeEventBe.php', 'MaeEventCategories\\MaeEventCatModel' => 'system/modules/mae_event_categories/models/MaeEventCatModel.php', 'MaeEventCategories\\ModuleFilter' => 'system/modules/mae_event_categories/modules/ModuleFilter.php'));
/**
 * Register the templates
 */
TemplateLoader::addFiles(array('mod_mae_event_filter' => 'system/modules/mae_event_categories/templates/modules'));
开发者ID:marebe1602,项目名称:mae_event_categories,代码行数:8,代码来源:autoload.php

示例7:

<?php

/**
 * news_categories extension for Contao Open Source CMS
 *
 * Copyright (C) 2011-2014 Codefog
 *
 * @package news_categories
 * @author  Webcontext <http://webcontext.com>
 * @author  Codefog <info@codefog.pl>
 * @author  Kamil Kuzminski <kamil.kuzminski@codefog.pl>
 * @license LGPL
 */
/**
 * Register the namespace
 */
ClassLoader::addNamespace('NewsCategories');
/**
 * Register the classes
 */
ClassLoader::addClasses(array('NewsCategories\\News' => 'system/modules/news_categories/classes/News.php', 'NewsCategories\\NewsCategories' => 'system/modules/news_categories/classes/NewsCategories.php', 'NewsCategories\\ContentNewsFilter' => 'system/modules/news_categories/elements/ContentNewsFilter.php', 'NewsCategories\\NewsCategoryModel' => 'system/modules/news_categories/models/NewsCategoryModel.php', 'NewsCategories\\NewsCategoryMultilingualModel' => 'system/modules/news_categories/models/NewsCategoryMultilingualModel.php', 'NewsCategories\\NewsModel' => 'system/modules/news_categories/models/NewsModel.php', 'NewsCategories\\ModuleNewsCategories' => 'system/modules/news_categories/modules/ModuleNewsCategories.php', 'NewsCategories\\ModuleNewsArchive' => 'system/modules/news_categories/modules/ModuleNewsArchive.php', 'NewsCategories\\ModuleNewsList' => 'system/modules/news_categories/modules/ModuleNewsList.php', 'NewsCategories\\ModuleNewsMenu' => 'system/modules/news_categories/modules/ModuleNewsMenu.php'));
/**
 * Register the templates
 */
TemplateLoader::addFiles(array('mod_newscategories' => 'system/modules/news_categories/templates/modules', 'nav_newscategories' => 'system/modules/news_categories/templates/navigation'));
开发者ID:codefog,项目名称:contao-news_categories,代码行数:25,代码来源:autoload.php

示例8:

<?php

/**
 * assets_manager extension for Contao Open Source CMS
 *
 * Copyright (C) 2011-2015 Codefog
 *
 * @package assets_manager
 * @author  Codefog <http://codefog.pl>
 * @author  Kamil Kuzminski <kamil.kuzminski@codefog.pl>
 * @license LGPL
 */
/**
 * Register the namespace
 */
ClassLoader::addNamespace('Codefog\\AssetsManager');
/**
 * Register the classes
 */
ClassLoader::addClasses(array('Codefog\\AssetsManager\\AssetsManager' => 'system/modules/assets_manager/library/AssetsManager.php', 'Codefog\\AssetsManager\\Asset\\BaseAsset' => 'system/modules/assets_manager/library/Asset/BaseAsset.php', 'Codefog\\AssetsManager\\Asset\\LocalAsset' => 'system/modules/assets_manager/library/Asset/LocalAsset.php', 'Codefog\\AssetsManager\\Asset\\ExternalAsset' => 'system/modules/assets_manager/library/Asset/ExternalAsset.php', 'Codefog\\AssetsManager\\Asset\\ScriptLocal\\ContaoAsset' => 'system/modules/assets_manager/library/Asset/ScriptLocal/ContaoAsset.php', 'Codefog\\AssetsManager\\Asset\\ScriptLocal\\JsAsset' => 'system/modules/assets_manager/library/Asset/ScriptLocal/JsAsset.php', 'Codefog\\AssetsManager\\Asset\\ScriptExternal\\JsAsset' => 'system/modules/assets_manager/library/Asset/ScriptExternal/JsAsset.php', 'Codefog\\AssetsManager\\Asset\\StyleLocal\\ContaoAsset' => 'system/modules/assets_manager/library/Asset/StyleLocal/ContaoAsset.php', 'Codefog\\AssetsManager\\Asset\\StyleLocal\\EditorAsset' => 'system/modules/assets_manager/library/Asset/StyleLocal/EditorAsset.php', 'Codefog\\AssetsManager\\Asset\\StyleLocal\\CssAsset' => 'system/modules/assets_manager/library/Asset/StyleLocal/CssAsset.php', 'Codefog\\AssetsManager\\Asset\\StyleLocal\\LessAsset' => 'system/modules/assets_manager/library/Asset/StyleLocal/LessAsset.php', 'Codefog\\AssetsManager\\Asset\\StyleLocal\\SassAsset' => 'system/modules/assets_manager/library/Asset/StyleLocal/SassAsset.php', 'Codefog\\AssetsManager\\Asset\\StyleExternal\\CssAsset' => 'system/modules/assets_manager/library/Asset/StyleExternal/CssAsset.php', 'Codefog\\AssetsManager\\AssetFilter\\FilterInterface' => 'system/modules/assets_manager/library/AssetFilter/FilterInterface.php', 'Codefog\\AssetsManager\\AssetFilter\\Minify\\MinifyFilter' => 'system/modules/assets_manager/library/AssetFilter/Minify/MinifyFilter.php', 'Codefog\\AssetsManager\\AssetFilter\\Minify\\StyleFilter' => 'system/modules/assets_manager/library/AssetFilter/Minify/StyleFilter.php', 'Codefog\\AssetsManager\\AssetFilter\\Minify\\ScriptFilter' => 'system/modules/assets_manager/library/AssetFilter/Minify/ScriptFilter.php', 'Codefog\\AssetsManager\\AssetGroup\\BaseGroup' => 'system/modules/assets_manager/library/AssetGroup/BaseGroup.php', 'Codefog\\AssetsManager\\AssetGroup\\StyleLocalGroup' => 'system/modules/assets_manager/library/AssetGroup/StyleLocalGroup.php', 'Codefog\\AssetsManager\\AssetGroup\\StyleExternalGroup' => 'system/modules/assets_manager/library/AssetGroup/StyleExternalGroup.php', 'Codefog\\AssetsManager\\AssetGroup\\ScriptLocalGroup' => 'system/modules/assets_manager/library/AssetGroup/ScriptLocalGroup.php', 'Codefog\\AssetsManager\\AssetGroup\\ScriptExternalGroup' => 'system/modules/assets_manager/library/AssetGroup/ScriptExternalGroup.php', 'Codefog\\AssetsManager\\Dca\\AssetGroupDca' => 'system/modules/assets_manager/library/Dca/AssetGroupDca.php', 'Codefog\\AssetsManager\\Dca\\AssetDca' => 'system/modules/assets_manager/library/Dca/AssetDca.php', 'Codefog\\AssetsManager\\Dca\\LayoutDca' => 'system/modules/assets_manager/library/Dca/LayoutDca.php', 'Codefog\\AssetsManager\\Model\\AssetGroupModel' => 'system/modules/assets_manager/library/Model/AssetGroupModel.php', 'Codefog\\AssetsManager\\Model\\AssetModel' => 'system/modules/assets_manager/library/Model/AssetModel.php'));
开发者ID:codefog,项目名称:contao-assets_manager,代码行数:20,代码来源:autoload.php

示例9:

<?php

/**
 * Contao Open Source CMS
 *
 * Copyright (c) 2005-2016 Leo Feyer
 *
 * @package   Pro Search
 * @author    Alexander Naumov http://www.alexandernaumov.de
 * @license   CC BY-NC-ND 4.0
 * @copyright 2016 Alexander Naumov
 */
// namespace
ClassLoader::addNamespace('ProSearch');
$proSearchPath = 'system/modules/prosearch/';
if (version_compare(VERSION, '4.0', '>=') && !$GLOBALS['FM_NO_COMPOSER'] && $GLOBALS['FM_NO_COMPOSER'] != true) {
    $proSearchPath = 'vendor/prosearch/prosearch/';
}
// load classes
ClassLoader::addClasses(array('ProSearch\\ProSearch' => $proSearchPath . 'src/Resources/contao/classes/ProSearch.php', 'ProSearch\\Helper' => $proSearchPath . 'src/Resources/contao/classes/Helper.php', 'ProSearch\\UserSettings' => $proSearchPath . 'src/Resources/contao/classes/UserSettings.php', 'ProSearch\\ProSearchPalette' => $proSearchPath . 'src/Resources/contao/classes/ProSearchPalette.php', 'ProSearch\\PrepareDataException' => $proSearchPath . 'src/Resources/contao/classes/PrepareDataException.php', 'ProSearch\\ProSearchDataContainer' => $proSearchPath . 'src/Resources/contao/classes/ProSearchDataContainer.php', 'ProSearch\\AjaxSearchIndex' => $proSearchPath . 'src/Resources/contao/widgets/AjaxSearchIndex.php', 'ProSearch\\TagTextField' => $proSearchPath . 'src/Resources/contao/widgets/TagTextField.php'));
开发者ID:alnv,项目名称:prosearch,代码行数:20,代码来源:autoload.php

示例10:

<?php

/**
 * Contao Open Source CMS
 * 
 * Copyright (C) 2005-2014 Leo Feyer
 * 
 * @package jQueryVersionSwitcher
 * @link    http://contao.org
 * @license http://www.gnu.org/licenses/lgpl-3.0.html LGPL
 */
/**
 * Register the namespace
 */
ClassLoader::addNamespace('WebCreations');
/**
 * Register the classes
 */
ClassLoader::addClasses(array('WebCreations\\jQueryVersionSwitcher' => 'system/modules/jQueryVersionSwitcher/classes/jQueryVersionSwitcher.php'));
开发者ID:ma3xl3,项目名称:contao-jquery-version-switcher,代码行数:19,代码来源:autoload.php

示例11:

<?php

/**
 * polls extension for Contao Open Source CMS
 *
 * Copyright (C) 2013 Codefog
 *
 * @package polls
 * @author  Codefog <http://codefog.pl>
 * @author  Kamil Kuzminski <kamil.kuzminski@codefog.pl>
 * @license LGPL
 */
/**
 * Register a custom namespace
 */
ClassLoader::addNamespace('Polls');
/**
 * Register the classes
 */
ClassLoader::addClasses(array('Polls\\Poll' => 'system/modules/polls/classes/Poll.php', 'Polls\\ContentPoll' => 'system/modules/polls/elements/ContentPoll.php', 'Polls\\PollModel' => 'system/modules/polls/models/PollModel.php', 'Polls\\PollOptionModel' => 'system/modules/polls/models/PollOptionModel.php', 'Polls\\PollVotesModel' => 'system/modules/polls/models/PollVotesModel.php', 'Polls\\ModulePoll' => 'system/modules/polls/modules/ModulePoll.php', 'Polls\\ModulePollList' => 'system/modules/polls/modules/ModulePollList.php'));
/**
 * Register the templates
 */
TemplateLoader::addFiles(array('ce_poll' => 'system/modules/polls/templates', 'mod_poll' => 'system/modules/polls/templates', 'mod_polllist' => 'system/modules/polls/templates', 'poll_default' => 'system/modules/polls/templates'));
开发者ID:hamidabbaszadeh,项目名称:contao-polls,代码行数:24,代码来源:autoload.php

示例12:

<?php

// created 21.05.15 ME
ClassLoader::addNamespace('Mae');
/**
 * Register the classes
 */
ClassLoader::addClasses(array('Mae\\MaeImageMap' => 'system/modules/mae_image_map/elements/MaeImageMap.php'));
/**
 * Register the templates
 */
TemplateLoader::addFiles(array('ce_mae_img_map' => 'system/modules/mae_image_map/templates'));
开发者ID:marebe1602,项目名称:mae_image_map,代码行数:12,代码来源:autoload.php

示例13:

<?php

/**
 * facebook_login extension for Contao Open Source CMS
 *
 * Copyright (C) 2013 Codefog
 *
 * @package facebook_login
 * @author  Codefog <http://codefog.pl>
 * @author  Kamil Kuzminski <kamil.kuzminski@codefog.pl>
 * @license LGPL
 */
/**
 * Register the namespace
 */
ClassLoader::addNamespace('FacebookLogin');
/**
 * Register the classes
 */
ClassLoader::addClasses(array('FacebookLogin\\FrontendUser' => 'system/modules/facebook_login/classes/FrontendUser.php', 'FacebookLogin\\ModuleFacebookLogin' => 'system/modules/facebook_login/modules/ModuleFacebookLogin.php', 'FacebookLogin\\ModulePersonalData' => 'system/modules/facebook_login/modules/ModulePersonalData.php', 'FacebookLogin\\FacebookApiException' => 'system/modules/facebook_login/library/Facebook/base_facebook.php', 'FacebookLogin\\BaseFacebook' => 'system/modules/facebook_login/library/Facebook/base_facebook.php', 'FacebookLogin\\Facebook' => 'system/modules/facebook_login/library/Facebook/facebook.php'));
/**
 * Register the templates
 */
TemplateLoader::addFiles(array('mod_facebook_login' => 'system/modules/facebook_login/templates/modules'));
开发者ID:codefog,项目名称:contao-facebook_login,代码行数:24,代码来源:autoload.php

示例14:

<?php

/**
 * form_control extension for Contao Open Source CMS
 *
 * @copyright  Copyright (c) 2008-2014, terminal42 gmbh
 * @author     terminal42 gmbh <info@terminal42.ch>
 * @license    http://opensource.org/licenses/lgpl-3.0.html LGPL
 * @link       http://github.com/terminal42/contao-form_control
 */
/**
 * Register the namespace
 */
ClassLoader::addNamespace('FormControl');
/**
 * Register the classes
 */
ClassLoader::addClasses(array('FormControl\\FormControlHelperTrait' => 'system/modules/form_control/forms/FormControlHelperTrait.php', 'FormControl\\FormControlCaptcha' => 'system/modules/form_control/forms/FormControlCaptcha.php', 'FormControl\\FormControlCheckBox' => 'system/modules/form_control/forms/FormControlCheckBox.php', 'FormControl\\FormControlFieldset' => 'system/modules/form_control/forms/FormControlFieldset.php', 'FormControl\\FormControlFileUpload' => 'system/modules/form_control/forms/FormControlFileUpload.php', 'FormControl\\FormControlHidden' => 'system/modules/form_control/forms/FormControlHidden.php', 'FormControl\\FormControlPassword' => 'system/modules/form_control/forms/FormControlPassword.php', 'FormControl\\FormControlRadioButton' => 'system/modules/form_control/forms/FormControlRadioButton.php', 'FormControl\\FormControlSelectMenu' => 'system/modules/form_control/forms/FormControlSelectMenu.php', 'FormControl\\FormControlSubmit' => 'system/modules/form_control/forms/FormControlSubmit.php', 'FormControl\\FormControlTextArea' => 'system/modules/form_control/forms/FormControlTextArea.php', 'FormControl\\FormControlTextField' => 'system/modules/form_control/forms/FormControlTextField.php'));
/**
 * Register the templates
 */
TemplateLoader::addFiles(array('form_control_captcha_default' => 'system/modules/form_control/templates', 'form_control_checkbox_default' => 'system/modules/form_control/templates', 'form_control_fieldset_default' => 'system/modules/form_control/templates', 'form_control_upload_default' => 'system/modules/form_control/templates', 'form_control_hidden_default' => 'system/modules/form_control/templates', 'form_control_password_default' => 'system/modules/form_control/templates', 'form_control_radio_default' => 'system/modules/form_control/templates', 'form_control_select_default' => 'system/modules/form_control/templates', 'form_control_submit_default' => 'system/modules/form_control/templates', 'form_control_textarea_default' => 'system/modules/form_control/templates', 'form_control_text_default' => 'system/modules/form_control/templates'));
开发者ID:terminal42,项目名称:contao-form_control,代码行数:22,代码来源:autoload.php

示例15:

<?php

/**
 * disqus extension for Contao Open Source CMS
 *
 * Copyright (C) 2013 Codefog
 *
 * @package disqus
 * @author  Codefog <http://codefog.pl>
 * @author  Kamil Kuzminski <kamil.kuzminski@codefog.pl>
 * @license LGPL
 */
/**
 * Register the namespace
 */
ClassLoader::addNamespace('Disqus');
/**
 * Register the classes
 */
ClassLoader::addClasses(array('Disqus\\Disqus' => 'system/modules/disqus/classes/Disqus.php', 'Disqus\\DisqusHybrid' => 'system/modules/disqus/classes/DisqusHybrid.php', 'Disqus\\DisqusComments' => 'system/modules/disqus/hybrids/DisqusComments.php'));
/**
 * Register the templates
 */
TemplateLoader::addFiles(array('disqus' => 'system/modules/disqus/templates', 'disqus_default' => 'system/modules/disqus/templates'));
开发者ID:codefog,项目名称:contao-disqus,代码行数:24,代码来源:autoload.php


注:本文中的ClassLoader::addNamespace方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。