function __construct(\IContextSource $context, $userName = null, $search = '', $including = false)
 {
     global $wgScriptPath;
     global $wgPageAttachment_imgAddUpdateAttachment;
     parent::__construct($context, $userName, $search, $including);
     $cacheManager = new \PageAttachment\Cache\CacheManager();
     $pageFactory = new \PageAttachment\Session\PageFactory($cacheManager);
     $this->security = new \PageAttachment\Security\SecurityManager();
     $this->session = new \PageAttachment\Session\Session($this->security, $pageFactory);
     $this->resource = new \PageAttachment\UI\Resource($this->security, $this->session);
     $this->rvt = $this->security->getCurrentRequestValidationToken();
     $this->command = new \PageAttachment\UI\Command($this->session, $this->resource, $this->rvt);
 }