PuSHEnvironment.php in Feeds 8.2
File
lib/Drupal/feeds/PuSHEnvironment.php
View source
<?php
namespace Drupal\feeds;
class PuSHEnvironment implements PuSHSubscriberEnvironmentInterface {
public static function instance() {
static $env;
if (empty($env)) {
$env = new PuSHEnvironment();
}
return $env;
}
public function msg($msg, $level = 'status') {
drupal_set_message(check_plain($msg), $level);
}
public function log($msg, $level = 'status') {
switch ($level) {
case 'error':
$severity = WATCHDOG_ERROR;
break;
case 'warning':
$severity = WATCHDOG_WARNING;
break;
default:
$severity = WATCHDOG_NOTICE;
break;
}
feeds_dbg($msg);
watchdog('FeedsHTTPFetcher', $msg, array(), $severity);
}
}
Classes
Name |
Description |
PuSHEnvironment |
Provide environmental functions to the PuSHSubscriber library. |