Skip to content

Commit

Permalink
update assets
Browse files Browse the repository at this point in the history
  • Loading branch information
kmvan committed Nov 22, 2018
1 parent b469925 commit 3e37c84
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions dist/prober.php
Original file line number Diff line number Diff line change
Expand Up @@ -310,8 +310,8 @@ function fillNetworkStats(data) {
</script>
HTML;
} }
namespace InnStudio\Prober\Events; class EventsApi { private static $PRIORITY_ID = 'priority'; private static $CALLBACK_ID = 'callback'; private static $events = array(); public static function on($name, $callback, $priority = 10) { if ( ! isset(self::$events[$name])) { self::$events[$name] = array(); } self::$events[$name][] = array( self::$PRIORITY_ID => $priority, self::$CALLBACK_ID => $callback, ); } public static function emit($name, $returns = null) { $events = isset(self::$events[$name]) ? self::$events[$name] : false; if ( ! $events) { return $returns; } $sortArr = \array_map(function ($filter) { return $filter[self::$PRIORITY_ID]; }, $events); \array_multisort( $sortArr, \SORT_ASC, \SORT_NUMERIC, $events ); foreach ($events as $filter) { $args = \func_get_args(); unset($args[0]); $returns = \call_user_func_array($filter[self::$CALLBACK_ID], $args); } return $returns; } }
namespace InnStudio\Prober\MyInfo; use InnStudio\Prober\Events\EventsApi; use InnStudio\Prober\Helper\HelperApi; use InnStudio\Prober\I18n\I18nApi; class MyInfo { private $ID = 'myInfo'; public function __construct() { EventsApi::on('mods', array($this, 'filter'), 900); } public function filter($mods) { $mods[$this->ID] = array( 'title' => I18nApi::_('My information'), 'tinyTitle' => I18nApi::_('Mine'), 'display' => array($this, 'display'), ); return $mods; } public function display() { return \implode('', \array_map(function (array $item) { return <<<HTML
namespace InnStudio\Prober\Events; class EventsApi { private static $events = array(); private static $PRIORITY_ID = 'priority'; private static $CALLBACK_ID = 'callback'; public static function on($name, $callback, $priority = 10) { if ( ! isset(self::$events[$name])) { self::$events[$name] = array(); } self::$events[$name][] = array( self::$PRIORITY_ID => $priority, self::$CALLBACK_ID => $callback, ); } public static function emit() { $args = \func_get_args(); $name = $args[0]; $return = isset($args[1]) ? $args[1] : null; unset($args[0],$args[1]); $events = isset(self::$events[$name]) ? self::$events[$name] : false; if ( ! $events) { return $return; } $sortArr = array(); foreach ($events as $k => $filter) { $sortArr[$k] = $filter[self::$PRIORITY_ID]; } \array_multisort($sortArr, $events); foreach ($events as $filter) { $return = \call_user_func_array($filter[self::$CALLBACK_ID], array($return, $args)); } return $return; } }
namespace InnStudio\Prober\MyInfo; use InnStudio\Prober\Events\EventsApi; use InnStudio\Prober\Helper\HelperApi; use InnStudio\Prober\I18n\I18nApi; class MyInfo { private $ID = 'myInfo'; public function __construct() { EventsApi::on('mods', array($this, 'filter'), 900); } public function filter(array $mods) { $mods[$this->ID] = array( 'title' => I18nApi::_('My information'), 'tinyTitle' => I18nApi::_('Mine'), 'display' => array($this, 'display'), ); return $mods; } public function display() { return \implode('', \array_map(function (array $item) { return <<<HTML
<div class="form-group">
<div class="group-label">{$item[0]}</div>
<div class="group-content">{$item[1]}</div>
Expand Down Expand Up @@ -522,7 +522,7 @@ function getVersionInfo(data){
</div>
HTML;
} return $content; } }
namespace InnStudio\Prober\Config; class ConfigApi { public static $APP_VERSION = '1.7.3'; public static $APP_NAME = 'X Prober'; public static $APP_URL = 'https://github.com/kmvan/x-prober'; public static $AUTHOR_URL = 'https://inn-studio.com/prober'; public static $UPDATE_PHP_URL = 'https://raw.githubusercontent.com/kmvan/x-prober/master/dist/prober.php'; public static $AUTHOR_NAME = 'INN STUDIO'; public static $CHANGELOG_URL = 'https://raw.githubusercontent.com/kmvan/x-prober/master/CHANGELOG.md'; public static $LATEST_PHP_STABLE_VERSION = '7.2.12'; }
namespace InnStudio\Prober\Config; class ConfigApi { public static $APP_VERSION = '1.7.4'; public static $APP_NAME = 'X Prober'; public static $APP_URL = 'https://github.com/kmvan/x-prober'; public static $AUTHOR_URL = 'https://inn-studio.com/prober'; public static $UPDATE_PHP_URL = 'https://raw.githubusercontent.com/kmvan/x-prober/master/dist/prober.php'; public static $AUTHOR_NAME = 'INN STUDIO'; public static $CHANGELOG_URL = 'https://raw.githubusercontent.com/kmvan/x-prober/master/CHANGELOG.md'; public static $LATEST_PHP_STABLE_VERSION = '7.2.12'; }
namespace InnStudio\Prober\Style; use InnStudio\Prober\Events\EventsApi; class Style { private $ID = 'style'; public function __construct() { EventsApi::on('style', array($this, 'filter')); } public function filter() { $this->styleProgress(); $this->styleGlobal(); $this->stylePoiContainer(); $this->stylePoiGrid(); $this->styleTitle(); } private function styleTitle() { ?>
<style>
.long-title{
Expand Down

0 comments on commit 3e37c84

Please sign in to comment.