• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

PHP PluginRegistrarWebapp类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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

示例1: setUp

 public function setUp()
 {
     parent::setUp();
     $webapp_plugin_registrar = PluginRegistrarWebapp::getInstance();
     $webapp_plugin_registrar->registerPlugin('youtube', 'YouTubePlugin');
     $_SERVER['SERVER_NAME'] = 'test';
 }
开发者ID:dgw,项目名称:ThinkUp,代码行数:7,代码来源:TestOfYouTubePluginConfigurationController.php


示例2: setUp

 public function setUp()
 {
     parent::setUp();
     $webapp_plugin_registrar = PluginRegistrarWebapp::getInstance();
     $webapp_plugin_registrar->registerPlugin('expandurls', 'ExpandURLsPlugin');
     $this->builders = self::buildData();
 }
开发者ID:ngugijames,项目名称:ThinkUp,代码行数:7,代码来源:TestOfExpandURLsPluginConfigurationController.php


示例3: loadView

 /**
  * Load the view with required variables
  */
 private function loadView()
 {
     $webapp_plugin_registrar = PluginRegistrarWebapp::getInstance();
     if ($this->view_name == 'default') {
         $this->loadDefaultDashboard();
     } else {
         $menu_item = $webapp_plugin_registrar->getDashboardMenuItem($this->view_name, $this->instance);
         if (isset($menu_item)) {
             $this->addToView('data_template', $menu_item->view_template);
             $this->addToView('display', $this->view_name);
             $this->addToView('header', $menu_item->name);
             $this->addToView('description', $menu_item->description);
             $this->addToView('parent', $menu_item->parent);
             $this->setPageTitle($this->instance->network_username . ' on ' . ucfirst($this->instance->network));
             $page = isset($_GET['page']) && is_numeric($_GET['page']) ? $_GET['page'] : 1;
             foreach ($menu_item->datasets as $dataset) {
                 if (array_search('#page_number#', $dataset->method_params) !== false) {
                     //there's paging
                     $this->addToView('next_page', $page + 1);
                     $this->addToView('last_page', $page - 1);
                 }
                 $this->addToView($dataset->name, $dataset->retrieveDataset($page));
                 if (Session::isLoggedIn() && $dataset->isSearchable()) {
                     $view_name = 'is_searchable';
                     $this->addToView($view_name, true);
                 }
                 $this->view_mgr->addHelp($this->view_name, $dataset->getHelp());
             }
         } else {
             $this->loadDefaultDashboard();
         }
     }
 }
开发者ID:JWFoxJr,项目名称:ThinkUp,代码行数:36,代码来源:class.DashboardController.php


示例4: adminControl

 public function adminControl()
 {
     if (!$this->is_missing_param) {
         // verify CSRF token
         $this->validateCSRFToken();
         $is_active = $_GET["a"] != 1 ? false : true;
         $plugin_dao = DAOFactory::getDAO('PluginDAO');
         $result = $plugin_dao->setActive($_GET["pid"], $is_active);
         if ($result > 0) {
             $plugin_folder = $plugin_dao->getPluginFolder($_GET["pid"]);
             $webapp_plugin_registrar = PluginRegistrarWebapp::getInstance();
             try {
                 $plugin_class_name = $webapp_plugin_registrar->getPluginObject($plugin_folder);
                 $p = new $plugin_class_name();
                 if ($is_active) {
                     $p->activate();
                 } else {
                     $p->deactivate();
                 }
             } catch (Exception $e) {
                 //plugin object isn't registered, do nothing
                 //echo $e->getMessage();
             }
         }
         $this->addToView('result', $result);
         $this->view_mgr->clear_all_cache();
     }
     return $this->generateView();
 }
开发者ID:JWFoxJr,项目名称:ThinkUp,代码行数:29,代码来源:class.ToggleActivePluginController.php


示例5: setUp

 public function setUp()
 {
     parent::setUp();
     $webapp_plugin_registrar = PluginRegistrarWebapp::getInstance();
     $webapp_plugin_registrar->registerPlugin('youtube', 'YouTubePlugin');
     $webapp_plugin_registrar->setActivePlugin('youtube');
 }
开发者ID:dgw,项目名称:ThinkUp,代码行数:7,代码来源:TestOfYouTubePlugin.php


示例6: tearDown

 /**
  * Destroy Config, Webapp, $_SESSION, $_POST, $_GET, $_REQUEST
  */
 public function tearDown()
 {
     Config::destroyInstance();
     PluginRegistrarWebapp::destroyInstance();
     PluginRegistrarCrawler::destroyInstance();
     if (isset($_SESSION)) {
         $this->unsetArray($_SESSION);
     }
     $this->unsetArray($_POST);
     $this->unsetArray($_GET);
     $this->unsetArray($_REQUEST);
     $this->unsetArray($_SERVER);
     $this->unsetArray($_FILES);
     Loader::unregister();
     $backup_dir = FileDataManager::getBackupPath();
     if (file_exists($backup_dir)) {
         try {
             @exec('cd ' . $backup_dir . '; rm -rf *');
             rmdir($backup_dir);
             // won't delete if has files
         } catch (Exception $e) {
         }
     }
     $data_dir = FileDataManager::getDataPath();
     if (file_exists($data_dir . 'compiled_view')) {
         try {
             @exec('cd ' . $data_dir . '; rm -rf compiled_view');
         } catch (Exception $e) {
         }
     }
     parent::tearDown();
 }
开发者ID:dgw,项目名称:ThinkUp,代码行数:35,代码来源:class.ThinkUpBasicUnitTestCase.php


示例7: setUp

 public function setUp()
 {
     parent::setUp();
     $webapp_plugin_registrar = PluginRegistrarWebapp::getInstance();
     $webapp_plugin_registrar->registerPlugin('twitter', 'TwitterPlugin');
     $this->config = Config::getInstance();
 }
开发者ID:73sl4,项目名称:ThinkUp,代码行数:7,代码来源:TestOfPostController.php


示例8: setUp

 public function setUp()
 {
     parent::setUp();
     $webapp_plugin_registrar = PluginRegistrarWebapp::getInstance();
     $webapp_plugin_registrar->registerPlugin('twitter', 'TwitterPlugin');
     $webapp_plugin_registrar->registerPlugin('facebook', 'FacebookPlugin');
     $webapp_plugin_registrar->registerPlugin('google+', 'GooglePlusPlugin');
 }
开发者ID:JWFoxJr,项目名称:ThinkUp,代码行数:8,代码来源:TestOfDashboardController.php


示例9: setUp

 public function setUp()
 {
     parent::setUp();
     $webapp_plugin_registrar = PluginRegistrarWebapp::getInstance();
     $webapp_plugin_registrar->registerPlugin('geoencoder', 'GeoEncoderPlugin');
     $_SERVER['SERVER_NAME'] = 'dev.thinkup.com';
     $_SERVER['HTTP_HOST'] = 'dev.thinkup.com';
 }
开发者ID:dgw,项目名称:ThinkUp,代码行数:8,代码来源:TestOfGeoEncoderPluginConfigurationController.php


示例10: setUp

 public function setUp()
 {
     parent::setUp();
     $webapp_plugin_registrar = PluginRegistrarWebapp::getInstance();
     $webapp_plugin_registrar->registerPlugin('twitter', 'TwitterPlugin');
     $this->builders = self::buildData();
     $_SERVER['HTTP_HOST'] = "mytesthost";
     $_SERVER['SERVER_NAME'] = 'dev.thinkup.com';
 }
开发者ID:pepeleproso,项目名称:ThinkUp,代码行数:9,代码来源:TestOfAccountConfigurationController.php


示例11: testWebappGetSetActivePlugin

 /**
  * Test activePlugin getter/setter
  */
 public function testWebappGetSetActivePlugin()
 {
     $webapp_plugin_registrar = PluginRegistrarWebapp::getInstance();
     $this->assertEqual($webapp_plugin_registrar->getActivePlugin(), "twitter");
     $webapp_plugin_registrar->setActivePlugin('facebook');
     $this->assertEqual($webapp_plugin_registrar->getActivePlugin(), "facebook");
     //make sure another instance reports back the same values
     $webapp_plugin_registrar_two = PluginRegistrarWebapp::getInstance();
     $this->assertEqual($webapp_plugin_registrar_two->getActivePlugin(), "facebook");
 }
开发者ID:ngugijames,项目名称:ThinkUp,代码行数:13,代码来源:TestOfWebapp.php


示例12: setUp

 public function setUp()
 {
     parent::setUp();
     $this->webapp_plugin_registrar = PluginRegistrarWebapp::getInstance();
     $this->webapp_plugin_registrar->registerPlugin('geoencoder', 'GeoEncoderPlugin');
     $this->webapp_plugin_registrar->registerPlugin('twitter', 'TwitterPlugin');
     $crawler_plugin_registrar = PluginRegistrarCrawler::getInstance();
     $crawler_plugin_registrar->registerCrawlerPlugin('GeoEncoderPlugin');
     $this->builders = self::buildData();
 }
开发者ID:dgw,项目名称:ThinkUp,代码行数:10,代码来源:TestOfGeoEncoderPlugin.php


示例13: setUp

 public function setUp()
 {
     parent::setUp();
     $this->webapp = PluginRegistrarWebapp::getInstance();
     $this->crawler = PluginRegistrarCrawler::getInstance();
     $this->webapp->registerPlugin('twitter', 'TwitterPlugin');
     $this->crawler->registerCrawlerPlugin('TwitterPlugin');
     $this->webapp->setActivePlugin('twitter');
     $this->logger = Logger::getInstance();
 }
开发者ID:ngugijames,项目名称:ThinkUp,代码行数:10,代码来源:TestOfTwitterPlugin.php


示例14: setUp

 public function setUp()
 {
     parent::setUp();
     $this->builders = array();
     $webapp_plugin_registrar = PluginRegistrarWebapp::getInstance();
     $webapp_plugin_registrar->registerPlugin('facebook', 'FacebookPlugin');
     $_SERVER['SERVER_NAME'] = 'dev.thinkup.com';
     $_SERVER['HTTP_HOST'] = 'dev.thinkup.com';
     $_SERVER['REQUEST_URI'] = '';
     //Add owners
     $owner_builder = FixtureBuilder::build('owners', array('id' => 1, 'full_name' => 'ThinkUp J. User', 'email' => '[email protected]', 'is_activated' => 1));
     array_push($this->builders, $owner_builder);
     //Add second owner
     $owner2_builder = FixtureBuilder::build('owners', array('id' => 2, 'full_name' => 'ThinkUp J. User 2', 'email' => '[email protected]', 'is_activated' => 1));
     array_push($this->builders, $owner2_builder);
 }
开发者ID:pepeleproso,项目名称:ThinkUp,代码行数:16,代码来源:TestOfFacebookPluginConfigurationController.php


示例15: testMenuItemRegistration

 public function testMenuItemRegistration()
 {
     $webapp_plugin_registrar = PluginRegistrarWebapp::getInstance();
     $instance = new Instance();
     $instance->network_user_id = 1;
     $menus = $webapp_plugin_registrar->getDashboardMenu($instance);
     // We only have one menu so far, the checkins
     $this->assertEqual(sizeof($menus), 1);
     $post_tab = $menus['posts'];
     $this->assertEqual($post_tab->name, "Checkins");
     $this->assertEqual($post_tab->description, "Your checkins");
     $post_tab_datasets = $post_tab->getDatasets();
     $this->assertEqual(count($post_tab_datasets), 1);
     $post_tab_dataset = $post_tab_datasets[0];
     $this->assertEqual($post_tab_dataset->name, "all_checkins");
     $this->assertEqual($post_tab_dataset->dao_name, 'PostDAO');
     $this->assertEqual($post_tab_dataset->dao_method_name, "getAllCheckins");
 }
开发者ID:73sl4,项目名称:ThinkUp,代码行数:18,代码来源:TestOfFoursquarePlugin.php


示例16: testDeactivate

 public function testDeactivate()
 {
     //all instagram accounts should be set to inactive on plugin deactivation
     $webapp_plugin_registrar = PluginRegistrarWebapp::getInstance();
     $logger = Logger::getInstance();
     $pd = DAOFactory::getDAO('PostDAO');
     $instance = new Instance();
     $instance->network_user_id = 1;
     $instance_builder_1 = FixtureBuilder::build('instances', array('network_username' => 'julie', 'network' => 'instagram', 'crawler_last_run' => '-1d', 'is_activated' => '1', 'is_public' => '1'));
     $instance_dao = DAOFactory::getDAO('InstanceDAO');
     $fb_active_instances = $instance_dao->getAllInstances("DESC", true, "instagram");
     $this->assertEqual(sizeof($fb_active_instances), 1);
     $fb_plugin = new InstagramPlugin();
     $fb_plugin->deactivate();
     $fb_active_instances = $instance_dao->getAllInstances("DESC", true, "instagram");
     $this->assertEqual(sizeof($fb_active_instances), 0);
     $logger->close();
 }
开发者ID:ngugijames,项目名称:ThinkUp,代码行数:18,代码来源:TestOfInstagramPlugin.php


示例17: testMenuItemRegistration

 public function testMenuItemRegistration()
 {
     $webapp_plugin_registrar = PluginRegistrarWebapp::getInstance();
     $logger = Logger::getInstance();
     $pd = DAOFactory::getDAO('PostDAO');
     $instance = new Instance();
     $instance->network_user_id = 1;
     $menus = $webapp_plugin_registrar->getDashboardMenu($instance);
     $posts_menu = $menus["posts-all"];
     $this->assertEqual(sizeof($menus), 5);
     $post_tab = $menus['posts-all'];
     $this->assertEqual($post_tab->name, "All posts");
     $this->assertEqual($post_tab->description, "All posts");
     $post_tab_datasets = $post_tab->getDatasets();
     $post_tab_dataset = $post_tab_datasets[0];
     $this->assertEqual($post_tab_dataset->name, "gplus_posts");
     $this->assertEqual($post_tab_dataset->dao_name, 'PostDAO');
     $this->assertEqual($post_tab_dataset->dao_method_name, "getAllPosts");
     $post_tab = $menus['posts-mostreplies'];
     $this->assertEqual($post_tab->name, "Most discussed");
     $this->assertEqual($post_tab->description, "Posts with the most comments");
     $post_tab_datasets = $post_tab->getDatasets();
     $post_tab_dataset = $post_tab_datasets[0];
     $this->assertEqual($post_tab_dataset->name, "gplus_posts");
     $this->assertEqual($post_tab_dataset->dao_name, 'PostDAO');
     $this->assertEqual($post_tab_dataset->dao_method_name, "getMostRepliedToPosts");
     $post_tab = $menus['posts-mostplusones'];
     $this->assertEqual($post_tab->name, "Most +1'ed");
     $this->assertEqual($post_tab->description, "Posts with most +1s");
     $post_tab_datasets = $post_tab->getDatasets();
     $post_tab_dataset = $post_tab_datasets[0];
     $this->assertEqual($post_tab_dataset->name, "gplus_posts");
     $this->assertEqual($post_tab_dataset->dao_name, 'PostDAO');
     $this->assertEqual($post_tab_dataset->dao_method_name, "getMostFavedPosts");
     $post_tab = $menus['posts-questions'];
     $this->assertEqual($post_tab->name, "Inquiries");
     $this->assertEqual($post_tab->description, "Inquiries, or posts with a question mark in them");
     $post_tab_datasets = $post_tab->getDatasets();
     $post_tab_dataset = $post_tab_datasets[0];
     $this->assertEqual($post_tab_dataset->name, "gplus_posts");
     $this->assertEqual($post_tab_dataset->dao_name, 'PostDAO');
     $this->assertEqual($post_tab_dataset->dao_method_name, "getAllQuestionPosts");
     $logger->close();
 }
开发者ID:JWFoxJr,项目名称:ThinkUp,代码行数:44,代码来源:TestOfGooglePlusPlugin.php


示例18: testGetPostDetailMenuItem

 public function testGetPostDetailMenuItem()
 {
     $webapp_plugin_registrar = PluginRegistrarWebapp::getInstance();
     $config = Config::getInstance();
     $webapp_plugin_registrar->registerPlugin('twitter', "TwitterPlugin");
     $webapp_plugin_registrar->setActivePlugin('twitter');
     $post = new Post(array('id' => 1, 'author_user_id' => 10, 'author_username' => 'no one', 'author_fullname' => "No One", 'author_avatar' => 'yo.jpg', 'source' => 'TweetDeck', 'pub_date' => '', 'adj_pub_date' => '', 'in_reply_to_user_id' => '', 'in_reply_to_post_id' => '', 'reply_count_cache' => '', 'in_retweet_of_post_id' => '', 'retweet_count_cache' => '', 'retweet_count_api' => '', 'old_retweet_count_cache' => '', 'in_rt_of_user_id' => '', 'post_id' => 9021481076, 'is_protected' => 0, 'place_id' => 'ece7b97d252718cc', 'favlike_count_cache' => 0, 'post_text' => 'I look cookies', 'network' => 'twitter', 'geo' => '', 'place' => '', 'location' => '', 'is_geo_encoded' => 0, 'is_reply_by_friend' => 0, 'is_retweet_by_friend' => 0, 'reply_retweet_distance' => 0));
     $menu_item = $webapp_plugin_registrar->getPostDetailMenuItem('fwds', $post);
     $this->assertIsA($menu_item, 'MenuItem');
     $this->assertEqual($menu_item->view_template, Utils::getPluginViewDirectory('twitter') . 'twitter.post.retweets.tpl', "Template ");
     $this->assertEqual($menu_item->name, 'Retweets', "Name");
     $this->assertEqual($menu_item->description, 'Retweets of this tweet', "Description");
     $this->assertIsA($menu_item->datasets, 'array');
     $this->assertEqual(sizeOf($menu_item->datasets), 1);
     $menu_item = $webapp_plugin_registrar->getPostDetailMenuItem('nonexistent', $post);
     $this->assertEqual($menu_item, null);
 }
开发者ID:dgw,项目名称:ThinkUp,代码行数:17,代码来源:TestOfWebapp.php


示例19: authControl

 /**
  * Outputs JavaScript callback string with json array/list of post as an argument
  */
 public function authControl($owner = false)
 {
     $public_search = false;
     if ($owner) {
         $public_search = true;
     }
     $private_reply_search = false;
     $this->setContentType('text/javascript');
     if (!$this->is_missing_param) {
         $instance_dao = DAOFactory::getDAO('InstanceDAO');
         if ($instance_dao->isUserConfigured($_GET['u'], $_GET['n'])) {
             $username = $_GET['u'];
             $ownerinstance_dao = DAOFactory::getDAO('OwnerInstanceDAO');
             $owner_dao = DAOFactory::getDAO('OwnerDAO');
             if (!$owner) {
                 $owner = $owner_dao->getByEmail($this->getLoggedInUser());
             }
             $instance = $instance_dao->getByUsername($username, $_GET['n']);
             if (!$ownerinstance_dao->doesOwnerHaveAccessToInstance($owner, $instance)) {
                 echo '{"status":"failed","message":"Insufficient privileges."}';
             } else {
                 echo "tu_grid_search.populate_grid(";
                 $posts_it;
                 if (isset($_GET['t'])) {
                     // replies?
                     $post_dao = DAOFactory::getDAO('PostDAO');
                     $posts_it = $post_dao->getRepliesToPostIterator($_GET['t'], $_GET['n'], 'default', 'km', $public_search);
                     if (!$public_search) {
                         $private_reply_search = true;
                     }
                 } else {
                     if (isset($_GET['nolimit']) && $_GET['nolimit'] == 'true') {
                         self::$MAX_ROWS = 0;
                     }
                     $webapp_plugin_registrar = PluginRegistrarWebapp::getInstance();
                     $webapp_plugin_registrar->setActivePlugin($instance->network);
                     $tab = $webapp_plugin_registrar->getDashboardMenuItem($_GET['d'], $instance);
                     $posts_it = $tab->datasets[0]->retrieveIterator();
                 }
                 echo '{"status":"success","limit":' . self::$MAX_ROWS . ',"posts": [' . "\n";
                 $cnt = 0;
                 // lets make sure we have a post iterator, and not just a list of posts
                 if (get_class($posts_it) != 'PostIterator') {
                     throw Exception("Grid Search should use a PostIterator to conserve memory");
                 }
                 foreach ($posts_it as $key => $value) {
                     if ($private_reply_search) {
                         if (!$ownerinstance_dao->doesOwnerHaveAccessToPost($owner, $value)) {
                             continue;
                         }
                     }
                     $cnt++;
                     $data = array('id' => $cnt, 'text' => $value->post_text, 'post_id_str' => $value->post_id . '_str', 'author' => $value->author_username, 'date' => $value->adj_pub_date, 'network' => $value->network);
                     echo json_encode($data) . ",\n";
                     flush();
                 }
                 $data = array('id' => -1, 'text' => 'Last Post', 'author' => 'nobody');
                 echo json_encode($data);
                 echo ']});';
             }
         } else {
             echo '{"status":"failed","message":"' . $_GET['u'] . 'is not configured."}';
         }
     } else {
         echo '{"status":"failed","message":"Missing Parameters"}';
     }
 }
开发者ID:JWFoxJr,项目名称:ThinkUp,代码行数:70,代码来源:class.GridController.php


示例20: authControl


//.........这里部分代码省略.........
             } else {
                 $this->addErrorMessage('Instance doesn\'t exist.', 'account');
             }
         } else {
             $this->addErrorMessage('You can only search for an individual keyword or hashtag, not a phrase. ' . 'Please try again.', 'account');
         }
     }
     //process change to notification frequency
     if (isset($_POST['updatefrequency'])) {
         $this->validateCSRFToken();
         $new_freq = isset($_POST['notificationfrequency']) ? $_POST['notificationfrequency'] : null;
         $updates = 0;
         if ($new_freq && isset($this->notification_frequencies[$new_freq])) {
             $updates = $owner_dao->setEmailNotificationFrequency($this->getLoggedInUser(), $new_freq);
         }
         if ($updates > 0) {
             // Update the user in the view to match
             $owner->email_notification_frequency = $new_freq;
             $this->addToView('owner', $owner);
             $this->addSuccessMessage('Your email notification frequency has been updated.', 'notifications');
         }
     }
     //process change to timezone
     if (isset($_POST['updatetimezone'])) {
         $this->validateCSRFToken();
         $new_tz = isset($_POST['timezone']) ? $_POST['timezone'] : null;
         $updates = 0;
         if (isset($new_tz)) {
             $possible_timezones = timezone_identifiers_list();
             if (in_array($new_tz, $possible_timezones)) {
                 $updates = $owner_dao->setTimezone($this->getLoggedInUser(), $new_tz);
             }
         }
         if ($updates > 0) {
             // Update the user in the view to match
             $owner->timezone = $new_tz;
             $this->addToView('owner', $owner);
             $this->addSuccessMessage('Your time zone has been saved.', 'timezone');
         }
     }
     $this->view_mgr->clear_all_cache();
     /* Begin plugin-specific configuration handling */
     if (isset($_GET['p']) && !isset($_GET['u'])) {
         // add config js to header
         if ($this->isAdmin()) {
             $this->addHeaderJavaScript('assets/js/plugin_options.js');
         }
         $active_plugin = $_GET['p'];
         $webapp_plugin_registrar = PluginRegistrarWebapp::getInstance();
         $pobj = $webapp_plugin_registrar->getPluginObject($active_plugin);
         $p = new $pobj();
         $this->addToView('body', $p->renderConfiguration($owner));
         $this->addToView('force_plugin', true);
         $profiler = Profiler::getInstance();
         $profiler->clearLog();
     } elseif (isset($_GET['p']) && isset($_GET['u']) && isset($_GET['n'])) {
         if ($this->isAdmin()) {
             $this->addHeaderJavaScript('assets/js/plugin_options.js');
         }
         $active_plugin = $_GET['p'];
         $instance_username = $_GET['u'];
         $instance_network = $_GET['n'];
         $webapp_plugin_registrar = PluginRegistrarWebapp::getInstance();
         $pobj = $webapp_plugin_registrar->getPluginObject($active_plugin);
         $p = new $pobj();
         $this->addToView('body', $p->renderInstanceConfiguration($owner, $instance_username, $instance_network));
         $this->addToView('force_plugin', true);
         $profiler = Profiler::getInstance();
         $profiler->clearLog();
     }
     $plugin_dao = DAOFactory::getDAO('PluginDAO');
     $config = Config::getInstance();
     $installed_plugins = $plugin_dao->getInstalledPlugins();
     $this->addToView('installed_plugins', $installed_plugins);
     /* End plugin-specific configuration handling */
     if ($owner->is_admin) {
         if (!isset($instance_dao)) {
             $instance_dao = DAOFactory::getDAO('InstanceDAO');
         }
         $owners = $owner_dao->getAllOwners();
         foreach ($owners as $o) {
             $instances = $instance_dao->getByOwner($o, true);
             $o->setInstances($instances);
         }
         $this->addToView('owners', $owners);
         $this->addToView('public_instances', $instance_dao->getPublicInstances());
     }
     $whichphp = @exec('which php');
     $php_path = !empty($whichphp) ? $whichphp : 'php';
     $email = $this->getLoggedInUser();
     //rss_crawl_url
     $rss_crawl_url = Utils::getApplicationURL() . sprintf('crawler/rss.php?un=%s&as=%s', urlencode($email), $owner->api_key);
     $this->addToView('rss_crawl_url', $rss_crawl_url);
     //cli_crawl_command
     $cli_crawl_command = 'cd ' . THINKUP_WEBAPP_PATH . 'crawler/;export THINKUP_PASSWORD=yourpassword; ' . $php_path . ' crawl.php ' . $email;
     $this->addToView('cli_crawl_command', $cli_crawl_command);
     //help link
     $this->view_mgr->addHelp('rss', 'userguide/datacapture');
     return $this->generateView();
 }
开发者ID:dgw,项目名称:ThinkUp,代码行数:101,代码来源:class.AccountConfigurationController.php



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP PluginRegistry类代码示例发布时间:2022-05-23
下一篇:
PHP PluginRegistrarInsights类代码示例发布时间:2022-05-23
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap