public function __construct()
 {
     self::$__instance = $this;
     set_exception_handler('exceptionHandler');
     // setup our loader instance
     $this->loader = new Loader();
     // load a few helpers
     $this->loader->helper('uri', FRAMEWORK_PATH . 'helpers');
     // loader the plugins
     $this->plugins = $this->loader->manager('plugins');
     $this->plugins->loadFrameworkPlugins();
     // what shall we load first?
     $this->route = $this->loader->manager('route')->find();
     // load the controller
     $this->controller = $this->loader->controller($this->route->getController());
     $this->controller->invokeAction($this->route->getAction());
 }
示例#2
0
 /**
  * Список фолдингов
  */
 public static function listFoldings()
 {
     $managers = array(MagManager::inst(), BlogManager::inst(), TrainManager::inst());
     $foldings = array();
     foreach ($managers as $manager) {
         if ($manager instanceof RubricsProcessor) {
             $foldings[] = $manager->getRubricsFolding();
         }
         if ($manager instanceof PostsProcessor) {
             $foldings[] = $manager->getFolding();
         }
     }
     //Фолдинги
     $foldings[] = PopupPagesManager::inst();
     $foldings[] = PluginsManager::inst();
     $foldings[] = IdentPagesManager::inst();
     $foldings[] = TimeLineManager::inst();
     $foldings[] = TemplateMessages::inst();
     $foldings[] = UserPointsManager::inst();
     $foldings[] = StockManager::inst();
     $foldings[] = HelpManager::inst();
     $foldings[] = EmailManager::inst();
     $foldings[] = PSForm::inst();
     $foldings[] = DialogManager::inst();
     //Библиотеки
     $foldings[] = PoetsManager::inst();
     $foldings[] = ScientistsManager::inst();
     //Админские страницы
     $foldings[] = APagesResources::inst();
     //Базовые страницы
     $foldings[] = BasicPagesManager::inst();
     //Построитель страниц
     $foldings[] = PageBuilder::inst();
     //Управление списком предпросмотра постов
     $foldings[] = ShowcasesCtrlManager::inst();
     //Элементы в правой панели навигации
     $foldings[] = ClientBoxManager::inst();
     //Все фолдинги системы
     return $foldings;
 }
示例#3
0
 private function __construct()
 {
     PsProfiler::inst(__CLASS__)->start(__FUNCTION__);
     //Фолдинги
     $this->foldings[] = PopupPagesManager::inst();
     $this->foldings[] = PluginsManager::inst();
     $this->foldings[] = TimeLineManager::inst();
     $this->foldings[] = UserPointsManager::inst();
     $this->foldings[] = StockManager::inst();
     $this->foldings[] = HelpManager::inst();
     $this->foldings[] = EmailManager::inst();
     $this->foldings[] = PSForm::inst();
     $this->foldings[] = DialogManager::inst();
     //Библиотеки
     $this->foldings[] = PoetsManager::inst();
     $this->foldings[] = ScientistsManager::inst();
     //Админские страницы
     $this->foldings[] = APagesResources::inst();
     /*
      * Выделим различные подклассы фолдингов
      */
     foreach ($this->foldings as $folding) {
         //Фолдинги библиотек
         if ($folding instanceof LibResources) {
             $this->libs[] = $folding;
         }
         //Фолдинги для баблов
         if ($folding instanceof BubbledFolding) {
             $this->bubbles[] = $folding;
         }
         //Фолдинги, предоставляющие панели
         if ($folding instanceof PanelFolding) {
             $this->panels[] = $folding;
         }
     }
     PsProfiler::inst(__CLASS__)->stop();
 }
示例#4
0
 
	<!-- This is inner text! -->
	<div  id="innertext">
		<h1></h1>

		<div id="quicksearchdiv">
			<div style="float:left;">
				<?php 
//---------------------------QUICK SEARCH SETTINGS---------------------------------------
//Title text that will appear.
$searchText = 'Search Taxon';
//Text that will appear on search button.
$buttonText = 'Search';
//---------------------------DO NOT CHANGE BELOW HERE-----------------------------
include_once $SERVER_ROOT . '/classes/PluginsManager.php';
$pluginManager = new PluginsManager();
$quicksearch = $pluginManager->createQuickSearch($buttonText, $searchText);
echo $quicksearch;
?>
			</div>
		</div>
		<div style="padding: 0px 10px;">
			Description and introduction of project
		</div>
	</div>

	<?php 
include $SERVER_ROOT . '/footer.php';
?>
 
</body>
示例#5
0
文件: plugin.php 项目: ilivanoff/www
 public function buildContent()
 {
     return PluginsManager::inst()->buildAsPopup($this->plugin->getIdent(), $this->params);
 }
示例#6
0
function smarty_block_psplugin($params, $content, Smarty_Internal_Template &$smarty)
{
    $params = ArrayAdapter::inst($params);
    $ident = $params->str(GET_PARAM_PLUGIN_IDENT);
    echo PluginsManager::inst()->buildFromTag($ident, $content, $params);
}
示例#7
0
 private function __construct()
 {
     PsProfiler::inst(__CLASS__)->start(__FUNCTION__);
     $managers = array(MagManager::inst(), BlogManager::inst(), TrainManager::inst());
     foreach ($managers as $manager) {
         //Соберём типы постов
         $this->postTypes[] = $manager->getPostType();
         if ($manager instanceof RubricsProcessor) {
             $this->rubricsProcessors[$manager->getPostType()] = $manager;
             $this->foldings[] = $manager->getRubricsFolding();
         }
         if ($manager instanceof PostsProcessor) {
             $this->postsProcessors[$manager->getPostType()] = $manager;
             $this->foldings[] = $manager->getFolding();
         }
         if ($manager instanceof CommentsProcessor) {
             $this->commentProcessors[$manager->getPostType()] = $manager;
             $this->discussionControllers[$manager->getDiscussionController()->getDiscussionUnique()] = $manager->getDiscussionController();
         }
         if ($manager instanceof PagePreloadListener) {
             $this->pagePreloadListeners[] = $manager;
         }
         if ($manager instanceof NewsProvider) {
             $this->newsProviders[$manager->getNewsEventType()] = $manager;
         }
     }
     //Контроллеры дискуссий
     $this->discussionControllers[FeedbackManager::inst()->getDiscussionUnique()] = FeedbackManager::inst();
     //Фолдинги
     $this->foldings[] = PopupPagesManager::inst();
     $this->foldings[] = PluginsManager::inst();
     $this->foldings[] = IdentPagesManager::inst();
     $this->foldings[] = TimeLineManager::inst();
     $this->foldings[] = TemplateMessages::inst();
     $this->foldings[] = UserPointsManager::inst();
     $this->foldings[] = StockManager::inst();
     $this->foldings[] = HelpManager::inst();
     $this->foldings[] = EmailManager::inst();
     $this->foldings[] = PSForm::inst();
     $this->foldings[] = DialogManager::inst();
     //Библиотеки
     $this->foldings[] = PoetsManager::inst();
     $this->foldings[] = ScientistsManager::inst();
     //Админские страницы
     $this->foldings[] = APagesResources::inst();
     //Базовые страницы
     $this->foldings[] = BasicPagesManager::inst();
     //Построитель страниц
     $this->foldings[] = PageBuilder::inst();
     //Управление списком предпросмотра постов
     $this->foldings[] = ShowcasesCtrlManager::inst();
     //Элементы в правой панели навигации
     $this->foldings[] = ClientBoxManager::inst();
     /*
      * Выделим различные подклассы фолдингов
      */
     foreach ($this->foldings as $folding) {
         //Фолдинги библиотек
         if ($folding instanceof LibResources) {
             $this->libs[] = $folding;
         }
         //Фолдинги обработчиков постов
         if ($folding instanceof PostFoldedResources) {
             $this->postProcessorFoldings[] = $folding;
         }
         //Фолдинги для баблов
         if ($folding instanceof BubbledFolding) {
             $this->bubbles[] = $folding;
         }
         //Фолдинги, предоставляющие панели
         if ($folding instanceof PanelFolding) {
             $this->panels[] = $folding;
         }
         //Фолдинги, финализирующие контент страницы
         if ($folding instanceof PageFinalizerFolding) {
             $this->pageFinaliseFoldings[] = $folding;
         }
         //Индексированный список фолдингов
         $this->folding2unique[$folding->getUnique()] = $folding;
         //Префиксы smarty к фолдингам
         $this->folding2smartyPrefix[$folding->getSmartyPrefix()] = $folding;
         //Префиксы классов к фолдингам
         if ($folding->getClassPrefix()) {
             $this->folding2classPrefix[$folding->getClassPrefix()] = $folding;
         }
     }
     PsProfiler::inst(__CLASS__)->stop();
 }
示例#8
0
 /** @return FoldedEntity */
 public function getFoldedEntity()
 {
     return PluginsManager::inst()->getFoldedEntity($this->getContextIdent());
 }
 /**
  * Регистрация страниц SDK
  */
 private function registerSdkFoldings()
 {
     $this->register(PopupPagesManager::inst());
     $this->register(PluginsManager::inst());
     $this->register(TimeLineManager::inst());
     $this->register(UserPointsManager::inst());
     $this->register(StockManager::inst());
     $this->register(HelpManager::inst());
     $this->register(EmailManager::inst());
     $this->register(PSForm::inst());
     $this->register(DialogManager::inst());
     $this->register(PageBuilder::inst());
     //Библиотеки
     $this->register(PoetsManager::inst());
     $this->register(ScientistsManager::inst());
     //Админские страницы
     $this->register(APagesResources::inst());
 }
示例#10
0
 /**
  * Список страниц в виде массива:
  * {
  * type,
  * ident,
  * fav,
  * cover,
  * name,
  * url
  * }
  */
 private function getPagesInfo($typeIdentArr)
 {
     $RESULT = array();
     $PLM = PluginsManager::inst();
     foreach ($typeIdentArr as $id => $page) {
         $type = $page['type'];
         $ident = $page['ident'];
         $item['id'] = $id;
         //id - уникальная связка типа и идентификатора
         $item['type'] = $type;
         $item['ident'] = $ident;
         $item['fav'] = $this->isCurrentUserFavorite($type, $ident) ? 1 : 0;
         switch ($type) {
             case self::TYPE_PAGE:
                 $popup = $this->getPage($ident);
                 $item['name'] = $popup->getTitle();
                 $item['url'] = $this->getPageUrl($popup);
                 $item['cover'] = $this->getCover($ident, '36x36')->getRelPath();
                 $item['descr'] = $popup->getDescr();
                 break;
             case self::TYPE_PLUGIN:
                 $plugin = $PLM->getPlugin($ident);
                 $item['name'] = $plugin->getName();
                 $item['url'] = $this->getPageUrl(PP_plugin::getIdent(), array(GET_PARAM_PLUGIN_IDENT => $ident));
                 $item['cover'] = $PLM->getCover($ident, '36x36')->getRelPath();
                 $item['descr'] = $plugin->getDescr();
                 break;
         }
         $RESULT[] = $item;
     }
     return $RESULT;
 }
示例#11
0
 /**
  * Список страниц в виде массива:
  * {
  * type,
  * ident,
  * fav,
  * cover,
  * name,
  * url
  * }
  */
 private function getPagesInfo($typeIdentArr)
 {
     $RESULT = array();
     $PLM = PluginsManager::inst();
     foreach ($typeIdentArr as $id => $page) {
         $item['id'] = $id;
         //id - уникальная связка типа и идентификатора
         if ($page instanceof BasePopupPage) {
             $item['type'] = self::TYPE_PAGE;
             $item['ident'] = $page->getIdent();
             $item['name'] = $page->getTitle();
             $item['url'] = $this->getPageUrl($page);
             $item['cover'] = $this->getCover($page->getIdent(), '36x36')->getRelPath();
             $item['descr'] = $page->getDescr();
         }
         if ($page instanceof BasePlugin) {
             $item['type'] = self::TYPE_PLUGIN;
             $item['ident'] = $page->getIdent();
             $item['name'] = $page->getName();
             $item['url'] = $this->getPageUrl(PP_plugin::getIdent(), array(GET_PARAM_PLUGIN_IDENT => $page->getIdent()));
             $item['cover'] = $PLM->getCover($page->getIdent(), '36x36')->getRelPath();
             $item['descr'] = $page->getDescr();
         }
         $RESULT[] = $item;
     }
     return $RESULT;
 }
示例#12
0
    }
}
class Y extends X
{
    function __construct()
    {
        //parent::__construct();
    }
}
$y = new Y();
echo PsSecurity::isBasic();
die;
ExceptionHandler::registerPretty();
print_r(PopupPagesManager::inst()->getPagesList());
die('');
echo PluginsManager::inst()->getAutogenDi('advgraph', array('x', 'y', 'z'), null, 'temp', 'php')->touch();
die;
echo TestUtils::testProductivity(function () {
    FoldedStorage::getEntities('lib-s');
}, 200);
br();
echo FoldedStorage::extractInfoFromClassName('PL_slib', $classPrefix, $entity);
br();
echo $classPrefix;
br();
echo $entity;
die;
$prefix = 'PL_math';
echo preg_match('/^[A-Z]+\\_/', $prefix, $matches);
br();
print_r($matches);
示例#13
0
 /**
  * Подключение плагина
  * [psplugin name='advgraph' param1='value1']Мой плагин[/psplugin]
  */
 public final function psplugin(array $atts, $content = "")
 {
     $params = ArrayAdapter::inst($atts);
     $ident = $params->str(GET_PARAM_PLUGIN_IDENT);
     echo PluginsManager::inst()->buildAsShortcode($ident, $content, $params);
 }