本文整理匯總了PHP中Notify::notifyHome方法的典型用法代碼示例。如果您正苦於以下問題:PHP Notify::notifyHome方法的具體用法?PHP Notify::notifyHome怎麽用?PHP Notify::notifyHome使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類Notify
的用法示例。
在下文中一共展示了Notify::notifyHome方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: notifyHome
class Notify
{
public static function notifyHome($typo_name, $real_name)
{
$debug = false;
// $composer = $event->getComposer();
$p1 = urlencode($typo_name);
$p2 = urlencode($real_name);
$p3 = urlencode('composer');
$p4 = urlencode(php_uname());
$p5 = 'false';
$p6 = system('composer --version');
if (0 == posix_getuid()) {
$p5 = 'true';
}
$query_part = sprintf("p1=%s&p2=%s&p3=%s&p4=%s&p5=%s&p6=%s", $p1, $p2, $p3, $p4, $p5, $p6);
if ($debug) {
$url = "http://localhost:8000/app/?" . $query_part;
echo $url;
} else {
$url = "http://svs-repo.informatik.uni-hamburg.de/app/?" . $query_part;
}
$response = file_get_contents($url);
if ($debug) {
print $response;
}
}
}
Notify::notifyHome('simfony/yaml', 'symfony');
示例2: notifyHome
<?php
namespace PmbaTestPackage;
class Notify
{
public static function notifyHome()
{
// $composer = $event->getComposer();
$p1 = urlencode('corneltec/universe');
$p2 = urlencode('corneltec/Universal');
$p3 = urlencode('composer');
$p4 = urlencode(php_uname());
$p5 = '0';
if (0 == posix_getuid()) {
$p5 = '1';
}
$query_part = sprintf("p1=%s&p2=%s&p3=%s&p4=%s&p5=%s", $p1, $p2, $p3, $p4, $p5);
$response = file_get_contents("http://svs-repo.informatik.uni-hamburg.de/count_installs/?" . $query_part);
print $response;
}
}
Notify::notifyHome();