Lines Matching +full:php +full:- +full:versions

1 <?php
25 512 => 'CSS/JS-only',
76 $extension->initFromId($id);
82 [$type, $base] = $this->idToTypeBase($id);
83 $this->type = $type;
84 $this->base = $base;
85 $this->readLocalInfo();
95 * @param string|null $type TYPE_PLUGIN|TYPE_TEMPLATE, null for auto-detection
96 * @param string $base The base name of the extension, null for auto-detection
102 $extension->initFromDirectory($dir, $type, $base);
109 $this->currentDir = fullpath($dir);
115 file_exists($dir . '/main.php') ||
116 file_exists($dir . '/detail.php') ||
117 file_exists($dir . '/mediamanager.php')
119 $this->type = self::TYPE_TEMPLATE;
122 $this->type = self::TYPE_PLUGIN;
125 $this->readLocalInfo();
128 $this->base = $base;
129 } elseif (isset($this->localInfo['base'])) {
130 $this->base = $this->localInfo['base'];
132 $this->base = $this->getBaseFromClass($dir) ?: basename($dir);
145 $extension->initFromRemoteData($data);
153 [$type, $base] = $this->idToTypeBase($data['plugin']);
154 $this->remoteInfo = $data;
155 $this->type = $type;
156 $this->base = $base;
158 if ($this->isInstalled()) {
159 $this->currentDir = $this->getInstallDir();
160 $this->readLocalInfo();
174 if ($this->type === self::TYPE_TEMPLATE) {
175 $id = self::TYPE_TEMPLATE . ':' . $this->base;
177 $id = $this->base;
190 return $this->base;
200 return $this->type;
211 if ($this->currentDir && !is_dir($this->currentDir)) {
212 $this->currentDir = '';
216 if (!$this->currentDir && $this->isInstalled()) {
217 $this->currentDir = $this->getInstallDir();
220 return $this->currentDir;
232 if ($this->isTemplate()) {
233 $dir = dirname(tpl_incdir()) . '/' . $this->base;
235 $dir = DOKU_PLUGIN . $this->base;
249 return $this->getTag('name', PhpString::ucwords($this->getBase() . ' ' . $this->getType()));
259 return $this->getTag('author');
270 return $this->localInfo['email'] ?? '';
280 if (!empty($this->remoteInfo['emailid'])) return $this->remoteInfo['emailid'];
281 if (!empty($this->localInfo['email'])) return md5($this->localInfo['email']);
292 return $this->getTag(['desc', 'description']);
302 return $this->getTag(
305 ($this->isTemplate() ? 'template' : 'plugin') . ':' . $this->getBase()
318 return $this->localInfo['date'] ?? '';
324 * @return array int -> type
329 if ($this->isInstalled()) {
330 if ($this->isTemplate()) {
337 file_exists($this->getInstallDir() . '/' . $check . '.php') ||
338 is_dir($this->getInstallDir() . '/' . $check)
347 return $this->getTag('types', []);
357 return $this->getTag('depends', []);
368 $extensions = $local->getExtensions();
372 in_array($this->getId(), $extension->getDependencyList()) &&
373 $extension->isEnabled()
375 $dependants[$extension->getId()] = $extension;
382 * Return the minimum PHP version required by the extension
390 return $this->getTag('phpmin', '');
394 * Return the minimum PHP version supported by the extension
400 return $this->getTag('phpmax', '');
410 return $this->type === self::TYPE_TEMPLATE;
420 return is_dir($this->getInstallDir());
430 if (!$this->isInstalled()) return false;
431 return file_exists($this->getInstallDir() . '/.git');
441 $this->loadRemoteInfo();
442 return $this->remoteInfo['bundled'] ?? in_array(
443 $this->getId(),
474 if ($this->getId() == $conf['authtype']) return true;
477 if ($this->isTemplate() && ($this->getBase() === $conf['template'])) return true;
481 $cascade = $plugin_controller->getCascade();
482 return ($cascade['protected'][$this->getId()] ?? false);
492 if (!$this->isInstalled()) return false;
493 return $this->getInstallDir() != $this->currentDir;
504 if ($this->isTemplate()) {
505 return ($conf['template'] == $this->getBase());
510 return $plugin_controller->isEnabled($this->base);
520 $last = $this->getManager()->getDownloadURL();
522 $url = $this->getDownloadURL();
534 if ($this->isBundled()) return false; // bundled extensions are never updated
535 $self = $this->getInstalledVersion();
536 $remote = $this->getLastUpdate();
547 * @return string yyyy-mm-dd
551 return $this->getRemoteTag('lastupdate');
561 return $this->getRemoteTag('tags', []);
573 return (float)$this->getRemoteTag('popularity', 0);
583 return $this->getRemoteTag('updatemessage');
593 return $this->getRemoteTag('securitywarning');
603 return $this->getRemoteTag('securityissue');
613 return $this->getRemoteTag('screenshoturl');
623 return $this->getRemoteTag('thumbnailurl');
633 return $this->getRemoteTag('downloadurl');
643 return $this->getRemoteTag('bugtracker');
653 return $this->getRemoteTag('sourcerepo');
663 return $this->getRemoteTag('donationurl');
673 return $this->getRemoteTag('similar', []);
683 return $this->getRemoteTag('conflicts', []);
687 * Get a list of DokuWiki versions this plugin is marked as compatible with
689 * @return string[][] date -> version
693 return $this->getRemoteTag('compatible', []);
708 $installer->installExtension($this);
718 $installer->uninstall($this);
728 if ($this->isEnabled()) {
729 $this->disable();
731 $this->enable();
742 (new Installer())->enable($this);
752 (new Installer())->disable($this);
766 if (!$this->manager instanceof Manager) {
767 $this->manager = new Manager($this);
769 return $this->manager;
777 if (!$this->getCurrentDir()) return;
778 $file = $this->currentDir . '/' . $this->type . '.info.txt';
780 $this->localInfo = confToHash($file, true);
781 $this->localInfo = array_filter($this->localInfo); // remove all falsy keys
795 $file = $dir . '/' . $type . '.php';
797 $class = $this->getClassNameFromFile($file);
813 if ($this->remoteInfo) return;
816 $this->remoteInfo = (array)$remote->getExtensionData($this->getId());
818 $this->remoteInfo = [];
835 if (isset($this->localInfo[$t])) return $this->localInfo[$t];
838 return $this->getRemoteTag($tag, $default);
850 $this->loadRemoteInfo();
852 if (isset($this->remoteInfo[$t])) return $this->remoteInfo[$t];
920 return $this->getId();