Ejemplo n.º 1
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;
 }
Ejemplo n.º 2
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();
 }
Ejemplo n.º 3
0
 protected final function processImpl(PostArrayAdapter $adapter, $button)
 {
     return $this->processStock(StockManager::inst()->assertCanDoAction($adapter, $this->stockType()), $adapter, $button);
 }
Ejemplo n.º 4
0
 protected function processRequest(\ArrayAdapter $params)
 {
     return new IdentPageContent(StockManager::inst()->stockPageHtml());
 }
Ejemplo n.º 5
0
function smarty_function_stock($params, Smarty_Internal_Template &$template)
{
    echo StockManager::inst()->registerStock(ArrayAdapter::inst($params));
}
Ejemplo n.º 6
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();
 }
Ejemplo n.º 7
0
 /**
  * Сущность фолдинга для данного типа акций
  * 
  * @return FoldedEntity
  */
 protected function foldedEntity()
 {
     return StockManager::inst()->getFoldedEntity(self::getType());
 }
Ejemplo n.º 8
0
 /**
  * Регистрация страниц 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());
 }
Ejemplo n.º 9
0
 protected function executeImpl(ArrayAdapter $params)
 {
     return StockManager::inst()->executeAjaxAction($params);
 }
Ejemplo n.º 10
0
 public function doProcess(ArrayAdapter $params)
 {
     $this->stock = StockManager::inst()->getStockByIdent($params);
     $this->data = $this->stock->getFullView();
 }