本文整理汇总了PHP中Piwik_SitesManager_API::getSiteUrlsFromId方法的典型用法代码示例。如果您正苦于以下问题:PHP Piwik_SitesManager_API::getSiteUrlsFromId方法的具体用法?PHP Piwik_SitesManager_API::getSiteUrlsFromId怎么用?PHP Piwik_SitesManager_API::getSiteUrlsFromId使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Piwik_SitesManager_API
的用法示例。
在下文中一共展示了Piwik_SitesManager_API::getSiteUrlsFromId方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: index
function index()
{
$view = new Piwik_View('SitesManager/templates/SitesManager.tpl');
$sites = Piwik_SitesManager_API::getSitesWithAdminAccess();
foreach ($sites as &$site) {
$site['alias_urls'] = Piwik_SitesManager_API::getSiteUrlsFromId($site['idsite']);
}
$view->adminSites = $sites;
$view->menu = Piwik_GetAdminMenu();
echo $view->render();
}
示例2: index
function index()
{
$view = Piwik_View::factory('SitesManager');
$sites = Piwik_SitesManager_API::getSitesWithAdminAccess();
foreach ($sites as &$site) {
$site['alias_urls'] = Piwik_SitesManager_API::getSiteUrlsFromId($site['idsite']);
}
$view->adminSites = $sites;
$this->setGeneralVariablesView($view);
$view->menu = Piwik_GetAdminMenu();
echo $view->render();
}
示例3: recordWebsiteHostsInCache
function recordWebsiteHostsInCache($notification)
{
$idsite = $notification->getNotificationInfo();
// add the 'hosts' entry in the website array
$array =& $notification->getNotificationObject();
$urls = Piwik_SitesManager_API::getSiteUrlsFromId($idsite);
$hosts = array();
foreach ($urls as $url) {
$url = parse_url($url);
if (isset($url['host'])) {
$hosts[] = $url['host'];
}
}
$array['hosts'] = $hosts;
}
示例4: test_updateSite_severalUrls
/**
* several urls => both main and alias are updated
*/
function test_updateSite_severalUrls()
{
$urls = array("http://piwiknew.com", "http://piwiknew.net", "http://piwiknew.org", "http://piwiknew.fr");
$idsite = Piwik_SitesManager_API::addSite("site1", $urls);
$newurls = array("http://piwiknew2.com", "http://piwiknew2.net", "http://piwiknew2.org", "http://piwiknew2.fr");
Piwik_SitesManager_API::updateSite($idsite, "test toto@{}", $newurls);
$allUrls = Piwik_SitesManager_API::getSiteUrlsFromId($idsite);
sort($allUrls);
sort($newurls);
$this->assertEqual($allUrls, $newurls);
}