OSDN Git Service

Import current code.
[osdn-codes/wiki-parser.git] / sfjp / wiki / processor / denied.php
1 <?php
2 namespace sfjp\Wiki\Processor;
3 class Denied extends Base {
4         function __construct($args = null) {
5                 parent::__construct();
6                 $this->name = $args[0];
7         }
8
9         public function process($text) {
10                 $this->setContext(array('whole_page_cachable' => false));
11                 if ($this->getContext("suppress_plugin_error")) {
12                         $this->formatted_text = '';
13                 } else {
14                         $this->formatted_text = '<span class="wiki-system-error">[Plugin Load Denied: ' . htmlspecialchars($this->name) . ']</span>';
15                 }
16                 return $this;
17         }
18 }