init
This commit is contained in:
10
vendor/composer/installers/.editorconfig
vendored
Normal file
10
vendor/composer/installers/.editorconfig
vendored
Normal file
@@ -0,0 +1,10 @@
|
||||
; top-most EditorConfig file
|
||||
root = true
|
||||
|
||||
; Unix-style newlines
|
||||
[*]
|
||||
end_of_line = LF
|
||||
|
||||
[*.php]
|
||||
indent_style = space
|
||||
indent_size = 4
|
||||
3
vendor/composer/installers/.gitignore
vendored
Normal file
3
vendor/composer/installers/.gitignore
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
vendor/
|
||||
composer.lock
|
||||
.idea/
|
||||
33
vendor/composer/installers/.travis.yml
vendored
Normal file
33
vendor/composer/installers/.travis.yml
vendored
Normal file
@@ -0,0 +1,33 @@
|
||||
language: php
|
||||
|
||||
sudo: false
|
||||
|
||||
dist: trusty
|
||||
|
||||
git:
|
||||
depth: 5
|
||||
|
||||
php:
|
||||
- 5.4
|
||||
- 5.5
|
||||
- 5.6
|
||||
- 7.0
|
||||
- 7.1
|
||||
- 7.2
|
||||
- hhvm
|
||||
- nightly
|
||||
|
||||
matrix:
|
||||
include:
|
||||
- dist: precise
|
||||
php: 5.3
|
||||
fast_finish: true
|
||||
allow_failures:
|
||||
- php: nightly
|
||||
|
||||
before_script:
|
||||
- composer self-update
|
||||
- composer install
|
||||
|
||||
script:
|
||||
- composer test
|
||||
86
vendor/composer/installers/CHANGELOG.md
vendored
Normal file
86
vendor/composer/installers/CHANGELOG.md
vendored
Normal file
@@ -0,0 +1,86 @@
|
||||
# Change Log
|
||||
|
||||
## [Unreleased]
|
||||
|
||||
## v1.5.0 - 2017-12-29
|
||||
### Added
|
||||
* Added WordPress dropin support.
|
||||
* Added new types supported for Eliasis.
|
||||
* Added support for Phoenix CMS.
|
||||
* Added MODX installer.
|
||||
* Added Majima instaler.
|
||||
* Added SiteDirect installer.
|
||||
* Added support optional prefix in OctoberCMS installers.
|
||||
* Added PHP 7.2 support.
|
||||
|
||||
### Changed
|
||||
* Changed remove packages, see [#348](https://github.com/composer/installers/pull/348).
|
||||
|
||||
### Fixed
|
||||
* Fixed code style, removed unused imports.
|
||||
|
||||
## v1.4.0 - 2017-08-09
|
||||
### Added
|
||||
* Installer for eZ Platform.
|
||||
* Installer for UserFrosting.
|
||||
* Installer for Osclass.
|
||||
* Installer for Lan Management System.
|
||||
|
||||
### Changed
|
||||
* Added vendor name to package path for Lavalite.
|
||||
|
||||
## v1.3.0 - 2017-04-24
|
||||
### Added
|
||||
* Kanboard plugins installer.
|
||||
* Porto-SAP installer.
|
||||
* Add `core` to concrete5 installer.
|
||||
* Support Moodle "search" plugin type.
|
||||
* SyDES installer.
|
||||
* iTop installer.
|
||||
* Lavalite installer.
|
||||
* Module type for Eliasis.
|
||||
* Vgmcp installer.
|
||||
* OntoWiki installer.
|
||||
* The requirements for contributing (CONTRIBUTING.md).
|
||||
|
||||
## v1.2.0 - 2016-08-13
|
||||
### Added
|
||||
* Installer for Attogram.
|
||||
* Installer for Cockpit.
|
||||
* Installer for Plentymarkets.
|
||||
* Installer for ReIndex.
|
||||
* Installer for Vanilla.
|
||||
* Installer for YAWIK.
|
||||
* Added missing environments for new Shopware (5.2) Plugin System.
|
||||
|
||||
## v1.1.0 - 2016-07-05
|
||||
### Added
|
||||
* Installer for ReIndex.
|
||||
* Installer for RadPHP.
|
||||
* Installer for Decibel.
|
||||
* Installer for Phifty.
|
||||
* Installer for ExpressionEngine.
|
||||
|
||||
### Changed
|
||||
* New paths for new Bitrix CMS. Old paths is deprecated.
|
||||
|
||||
### Deprecated
|
||||
* Old paths in Bitrix CMS Installer is deprecated.
|
||||
|
||||
## v1.0.25 - 2016-04-13
|
||||
### Removed
|
||||
* Revert TYPO3 installer deletion.
|
||||
|
||||
## v1.0.24 - 2016-04-05
|
||||
### Added
|
||||
* Installer for ImageCMS.
|
||||
* Installer for Mautic.
|
||||
* New types in the Kirby installer: `kirby-plugin` and `kirby-field`.
|
||||
* New types in the Drupal installer: `custom-theme` and `custom-module`.
|
||||
|
||||
### Changed
|
||||
* Switch to PSR-4.
|
||||
* Update Bitrix Installer: configuration for setting custom path to directory with kernel.
|
||||
|
||||
### Removed
|
||||
* Remove TYPO3 Extension installers.
|
||||
24
vendor/composer/installers/CONTRIBUTING.md
vendored
Normal file
24
vendor/composer/installers/CONTRIBUTING.md
vendored
Normal file
@@ -0,0 +1,24 @@
|
||||
# Contributing
|
||||
|
||||
If you would like to help, please take a look at the list of
|
||||
[issues](https://github.com/composer/installers/issues).
|
||||
|
||||
## Pull requests
|
||||
|
||||
* [Fork and clone](https://help.github.com/articles/fork-a-repo).
|
||||
* Run the command `php composer.phar install` to install the dependencies.
|
||||
This will also install the dev dependencies. See [Composer](https://getcomposer.org/doc/03-cli.md#install).
|
||||
* Use the command `phpunit` to run the tests. See [PHPUnit](http://phpunit.de).
|
||||
* Create a branch, commit, push and send us a
|
||||
[pull request](https://help.github.com/articles/using-pull-requests).
|
||||
|
||||
To ensure a consistent code base, you should make sure the code follows the
|
||||
coding standards [PSR-1](http://www.php-fig.org/psr/psr-1/) and
|
||||
[PSR-2](http://www.php-fig.org/psr/psr-2/).
|
||||
|
||||
### Create a new Installer
|
||||
|
||||
* Create class extends `Composer\Installers\BaseInstaller` with your Installer.
|
||||
* Create unit tests as a separate class or as part of a `Composer\Installers\Test\InstallerTest`.
|
||||
* Add information about your Installer in `README.md` in section "Current Supported Package Types".
|
||||
* Run the tests.
|
||||
19
vendor/composer/installers/LICENSE
vendored
Normal file
19
vendor/composer/installers/LICENSE
vendored
Normal file
@@ -0,0 +1,19 @@
|
||||
Copyright (c) 2012 Kyle Robinson Young
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is furnished
|
||||
to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
THE SOFTWARE.
|
||||
221
vendor/composer/installers/README.md
vendored
Normal file
221
vendor/composer/installers/README.md
vendored
Normal file
@@ -0,0 +1,221 @@
|
||||
# A Multi-Framework [Composer](http://getcomposer.org) Library Installer
|
||||
|
||||
[](http://travis-ci.org/composer/installers)
|
||||
|
||||
This is for PHP package authors to require in their `composer.json`. It will
|
||||
install their package to the correct location based on the specified package
|
||||
type.
|
||||
|
||||
The goal of Installers is to be a simple package type to install path map.
|
||||
Users can also customize the install path per package and package authors can
|
||||
modify the package name upon installing.
|
||||
|
||||
Installers isn't intended on replacing all custom installers. If your
|
||||
package requires special installation handling then by all means, create a
|
||||
custom installer to handle it.
|
||||
|
||||
**Natively Supported Frameworks**:
|
||||
|
||||
The following frameworks natively work with Composer and will be
|
||||
installed to the default `vendor` directory. `composer/installers`
|
||||
is not needed to install packages with these frameworks:
|
||||
|
||||
* Aura
|
||||
* Symfony2
|
||||
* Yii
|
||||
* Yii2
|
||||
|
||||
## Current Supported Package Types
|
||||
|
||||
> Stable types are marked as **bold**, this means that installation paths
|
||||
> for those type will not be changed. Any adjustment for those types would
|
||||
> require creation of brand new type that will cover required changes.
|
||||
|
||||
| Framework | Types
|
||||
| --------- | -----
|
||||
| Aimeos | `aimeos-extension`
|
||||
| Asgard | `asgard-module`<br>`asgard-theme`
|
||||
| Attogram | `attogram-module`
|
||||
| AGL | `agl-module`
|
||||
| Bonefish | `bonefish-package`
|
||||
| AnnotateCms | `annotatecms-module`<br>`annotatecms-component`<br>`annotatecms-service`
|
||||
| Bitrix | `bitrix-module` (deprecated) <br>`bitrix-component` (deprecated) <br>`bitrix-theme` (deprecated) <br><br> `bitrix-d7-module` <br> `bitrix-d7-component` <br> `bitrix-d7-template`
|
||||
| CakePHP 2+ | **`cakephp-plugin`**
|
||||
| Chef | `chef-cookbook`<br>`chef-role`
|
||||
| CCFramework | `ccframework-ship`<br>`ccframework-theme`
|
||||
| Cockpit | `cockpit-module`
|
||||
| CodeIgniter | `codeigniter-library`<br>`codeigniter-third-party`<br>`codeigniter-module`
|
||||
| concrete5 | `concrete5-core`<br>`concrete5-package`<br>`concrete5-theme`<br>`concrete5-block`<br>`concrete5-update`
|
||||
| Craft | `craft-plugin`
|
||||
| Croogo | `croogo-plugin`<br>`croogo-theme`
|
||||
| Decibel | `decibel-app`
|
||||
| DokuWiki | `dokuwiki-plugin`<br>`dokuwiki-template`
|
||||
| Dolibarr | `dolibarr-module`
|
||||
| Drupal | <b>`drupal-core`<br>`drupal-module`<br>`drupal-theme`</b><br>`drupal-library`<br>`drupal-profile`<br>`drupal-drush`
|
||||
| Elgg | `elgg-plugin`
|
||||
| Eliasis | `eliasis-component`<br>`eliasis-module`<br>`eliasis-plugin`<br>`eliasis-template`
|
||||
| ExpressionEngine 3 | `ee3-addon`<br>`ee3-theme`
|
||||
| eZ Platform | `ezplatform-assets`<br>`ezplatform-meta-assets`
|
||||
| FuelPHP v1.x | `fuel-module`<br>`fuel-package`<br/>`fuel-theme`
|
||||
| FuelPHP v2.x | `fuelphp-component`
|
||||
| Grav | `grav-plugin`<br>`grav-theme`
|
||||
| Hurad | `hurad-plugin`<br>`hurad-theme`
|
||||
| ImageCMS | `imagecms-template`<br>`imagecms-module`<br>`imagecms-library`
|
||||
| iTop | `itop-extension`
|
||||
| Joomla | `joomla-component`<br>`joomla-module`<br>`joomla-template`<br>`joomla-plugin`<br>`joomla-library`
|
||||
| Kanboard | `kanboard-plugin`
|
||||
| Kirby | **`kirby-plugin`**<br>`kirby-field`<br>`kirby-tag`
|
||||
| KodiCMS | `kodicms-plugin`<br>`kodicms-media`
|
||||
| Kohana | **`kohana-module`**
|
||||
| Lan Management System | `lms-plugin`<br>`lms-template`<br>`lms-document-template`<br>`lms-userpanel-module`
|
||||
| Laravel | `laravel-library`
|
||||
| Lavalite | `lavalite-theme`<br>`lavalite-package`
|
||||
| Lithium | **`lithium-library`<br>`lithium-source`**
|
||||
| Magento | `magento-library`<br>`magento-skin`<br>`magento-theme`
|
||||
| majima | `majima-plugin`
|
||||
| Mako | `mako-package`
|
||||
| Mautic | `mautic-plugin`<br>`mautic-theme`
|
||||
| Maya | `maya-module`
|
||||
| MODX | `modx-extra`
|
||||
| MODX Evo | `modxevo-snippet`<br>`modxevo-plugin`<br>`modxevo-module`<br>`modxevo-template`<br>`modxevo-lib`
|
||||
| MediaWiki | `mediawiki-extension`
|
||||
| October | **`october-module`<br>`october-plugin`<br>`october-theme`**
|
||||
| OntoWiki | `ontowiki-extension`<br>`ontowiki-theme`<br>`ontowiki-translation`
|
||||
| OXID | `oxid-module`<br>`oxid-theme`<br>`oxid-out`
|
||||
| Osclass | `osclass-plugin`<br>`osclass-theme`<br>`osclass-language`
|
||||
| MODULEWork | `modulework-module`
|
||||
| Moodle | `moodle-*` (Please [check source](https://raw.githubusercontent.com/composer/installers/master/src/Composer/Installers/MoodleInstaller.php) for all supported types)
|
||||
| Piwik | `piwik-plugin`
|
||||
| phpBB | `phpbb-extension`<br>`phpbb-style`<br>`phpbb-language`
|
||||
| Pimcore | `pimcore-plugin`
|
||||
| Plentymarkets | `plentymarkets-plugin`
|
||||
| PPI | **`ppi-module`**
|
||||
| Puppet | `puppet-module`
|
||||
| Porto | `porto-container`
|
||||
| RadPHP | `radphp-bundle`
|
||||
| REDAXO | `redaxo-addon`
|
||||
| ReIndex | **`reindex-plugin`** <br> **`reindex-theme`**
|
||||
| Roundcube | `roundcube-plugin`
|
||||
| shopware | `shopware-backend-plugin`<br/>`shopware-core-plugin`<br/>`shopware-frontend-plugin`<br/>`shopware-theme`<br/>`shopware-plugin`<br/>`shopware-frontend-theme`
|
||||
| SilverStripe | `silverstripe-module`<br>`silverstripe-theme`
|
||||
| SiteDirect | `sitedirect-module`<br>`sitedirect-plugin`
|
||||
| SMF | `smf-module`<br>`smf-theme`
|
||||
| SyDES | `sydes-module`<br>`sydes-theme`
|
||||
| symfony1 | **`symfony1-plugin`**
|
||||
| Tusk | `tusk-task`<br>`tusk-command`<br>`tusk-asset`
|
||||
| TYPO3 Flow | `typo3-flow-package`<br>`typo3-flow-framework`<br>`typo3-flow-plugin`<br>`typo3-flow-site`<br>`typo3-flow-boilerplate`<br>`typo3-flow-build`
|
||||
| TYPO3 CMS | `typo3-cms-extension` (Deprecated in this package, use the [TYPO3 CMS Installers](https://packagist.org/packages/typo3/cms-composer-installers) instead)
|
||||
| UserFrosting | `userfrosting-sprinkle`
|
||||
| Vanilla | `vanilla-plugin`<br>`vanilla-theme`
|
||||
| Vgmcp | `vgmcp-bundle`<br>`vgmcp-theme`
|
||||
| Wolf CMS | `wolfcms-plugin`
|
||||
| WordPress | <b>`wordpress-plugin`<br>`wordpress-theme`</b><br>`wordpress-muplugin`<br>`wordpress-dropin`
|
||||
| YAWIK | `yawik-module`
|
||||
| Zend | `zend-library`<br>`zend-extra`<br>`zend-module`
|
||||
| Zikula | `zikula-module`<br>`zikula-theme`
|
||||
| Prestashop | `prestashop-module`<br>`prestashop-theme`
|
||||
| Phifty | `phifty-bundle`<br>`phifty-framework`<br>`phifty-library`
|
||||
|
||||
## Example `composer.json` File
|
||||
|
||||
This is an example for a CakePHP plugin. The only important parts to set in your
|
||||
composer.json file are `"type": "cakephp-plugin"` which describes what your
|
||||
package is and `"require": { "composer/installers": "~1.0" }` which tells composer
|
||||
to load the custom installers.
|
||||
|
||||
```json
|
||||
{
|
||||
"name": "you/ftp",
|
||||
"type": "cakephp-plugin",
|
||||
"require": {
|
||||
"composer/installers": "~1.0"
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
This would install your package to the `Plugin/Ftp/` folder of a CakePHP app
|
||||
when a user runs `php composer.phar install`.
|
||||
|
||||
So submit your packages to [packagist.org](http://packagist.org)!
|
||||
|
||||
## Custom Install Paths
|
||||
|
||||
If you are consuming a package that uses the `composer/installers` you can
|
||||
override the install path with the following extra in your `composer.json`:
|
||||
|
||||
```json
|
||||
{
|
||||
"extra": {
|
||||
"installer-paths": {
|
||||
"your/custom/path/{$name}/": ["shama/ftp", "vendor/package"]
|
||||
}
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
A package type can have a custom installation path with a `type:` prefix.
|
||||
|
||||
``` json
|
||||
{
|
||||
"extra": {
|
||||
"installer-paths": {
|
||||
"your/custom/path/{$name}/": ["type:wordpress-plugin"]
|
||||
}
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
You can also have the same vendor packages with a custom installation path by
|
||||
using the `vendor:` prefix.
|
||||
|
||||
``` json
|
||||
{
|
||||
"extra": {
|
||||
"installer-paths": {
|
||||
"your/custom/path/{$name}/": ["vendor:my_organization"]
|
||||
}
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
These would use your custom path for each of the listed packages. The available
|
||||
variables to use in your paths are: `{$name}`, `{$vendor}`, `{$type}`.
|
||||
|
||||
## Custom Install Names
|
||||
|
||||
If you're a package author and need your package to be named differently when
|
||||
installed consider using the `installer-name` extra.
|
||||
|
||||
For example you have a package named `shama/cakephp-ftp` with the type
|
||||
`cakephp-plugin`. Installing with `composer/installers` would install to the
|
||||
path `Plugin/CakephpFtp`. Due to the strict naming conventions, you as a
|
||||
package author actually need the package to be named and installed to
|
||||
`Plugin/Ftp`. Using the following config within your **package** `composer.json`
|
||||
will allow this:
|
||||
|
||||
```json
|
||||
{
|
||||
"name": "shama/cakephp-ftp",
|
||||
"type": "cakephp-plugin",
|
||||
"extra": {
|
||||
"installer-name": "Ftp"
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
Please note the name entered into `installer-name` will be the final and will
|
||||
not be inflected.
|
||||
|
||||
## Should we allow dynamic package types or paths? No.
|
||||
|
||||
What are they? The ability for a package author to determine where a package
|
||||
will be installed either through setting the path directly in their
|
||||
`composer.json` or through a dynamic package type: `"type":
|
||||
"framework-install-here"`.
|
||||
|
||||
It has been proposed many times. Even implemented once early on and then
|
||||
removed. Installers won't do this because it would allow a single package
|
||||
author to wipe out entire folders without the user's consent. That user would
|
||||
then come here to yell at us.
|
||||
|
||||
Anyone still wanting this capability should consider requiring https://github.com/oomphinc/composer-installers-extender.
|
||||
1
vendor/composer/installers/_config.yml
vendored
Normal file
1
vendor/composer/installers/_config.yml
vendored
Normal file
@@ -0,0 +1 @@
|
||||
theme: jekyll-theme-cayman
|
||||
105
vendor/composer/installers/composer.json
vendored
Normal file
105
vendor/composer/installers/composer.json
vendored
Normal file
@@ -0,0 +1,105 @@
|
||||
{
|
||||
"name": "composer/installers",
|
||||
"type": "composer-plugin",
|
||||
"license": "MIT",
|
||||
"description": "A multi-framework Composer library installer",
|
||||
"keywords": [
|
||||
"installer",
|
||||
"Aimeos",
|
||||
"AGL",
|
||||
"AnnotateCms",
|
||||
"Attogram",
|
||||
"Bitrix",
|
||||
"CakePHP",
|
||||
"Chef",
|
||||
"Cockpit",
|
||||
"CodeIgniter",
|
||||
"concrete5",
|
||||
"Craft",
|
||||
"Croogo",
|
||||
"DokuWiki",
|
||||
"Dolibarr",
|
||||
"Drupal",
|
||||
"Elgg",
|
||||
"Eliasis",
|
||||
"ExpressionEngine",
|
||||
"eZ Platform",
|
||||
"FuelPHP",
|
||||
"Grav",
|
||||
"Hurad",
|
||||
"ImageCMS",
|
||||
"iTop",
|
||||
"Joomla",
|
||||
"Kanboard",
|
||||
"Kohana",
|
||||
"Lan Management System",
|
||||
"Laravel",
|
||||
"Lavalite",
|
||||
"Lithium",
|
||||
"Magento",
|
||||
"majima",
|
||||
"Mako",
|
||||
"Mautic",
|
||||
"Maya",
|
||||
"MODX",
|
||||
"MODX Evo",
|
||||
"MediaWiki",
|
||||
"OXID",
|
||||
"osclass",
|
||||
"MODULEWork",
|
||||
"Moodle",
|
||||
"Piwik",
|
||||
"pxcms",
|
||||
"phpBB",
|
||||
"Plentymarkets",
|
||||
"PPI",
|
||||
"Puppet",
|
||||
"Porto",
|
||||
"RadPHP",
|
||||
"ReIndex",
|
||||
"Roundcube",
|
||||
"shopware",
|
||||
"SilverStripe",
|
||||
"SMF",
|
||||
"SyDES",
|
||||
"symfony",
|
||||
"Thelia",
|
||||
"TYPO3",
|
||||
"WolfCMS",
|
||||
"WordPress",
|
||||
"YAWIK",
|
||||
"Zend",
|
||||
"Zikula"
|
||||
],
|
||||
"homepage": "https://composer.github.io/installers/",
|
||||
"authors": [
|
||||
{
|
||||
"name": "Kyle Robinson Young",
|
||||
"email": "kyle@dontkry.com",
|
||||
"homepage": "https://github.com/shama"
|
||||
}
|
||||
],
|
||||
"autoload": {
|
||||
"psr-4": { "Composer\\Installers\\": "src/Composer/Installers" }
|
||||
},
|
||||
"extra": {
|
||||
"class": "Composer\\Installers\\Plugin",
|
||||
"branch-alias": {
|
||||
"dev-master": "1.0-dev"
|
||||
}
|
||||
},
|
||||
"replace": {
|
||||
"shama/baton": "*",
|
||||
"roundcube/plugin-installer": "*"
|
||||
},
|
||||
"require": {
|
||||
"composer-plugin-api": "^1.0"
|
||||
},
|
||||
"require-dev": {
|
||||
"composer/composer": "1.0.*@dev",
|
||||
"phpunit/phpunit": "^4.8.36"
|
||||
},
|
||||
"scripts": {
|
||||
"test": "phpunit"
|
||||
}
|
||||
}
|
||||
25
vendor/composer/installers/phpunit.xml.dist
vendored
Normal file
25
vendor/composer/installers/phpunit.xml.dist
vendored
Normal file
@@ -0,0 +1,25 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
|
||||
<phpunit backupGlobals="false"
|
||||
backupStaticAttributes="false"
|
||||
colors="true"
|
||||
convertErrorsToExceptions="true"
|
||||
convertNoticesToExceptions="true"
|
||||
convertWarningsToExceptions="true"
|
||||
processIsolation="false"
|
||||
stopOnFailure="false"
|
||||
syntaxCheck="false"
|
||||
bootstrap="tests/bootstrap.php"
|
||||
>
|
||||
<testsuites>
|
||||
<testsuite name="Installers Test Suite">
|
||||
<directory>tests/Composer/Installers</directory>
|
||||
</testsuite>
|
||||
</testsuites>
|
||||
|
||||
<filter>
|
||||
<whitelist>
|
||||
<directory>src/Composer/Installers</directory>
|
||||
</whitelist>
|
||||
</filter>
|
||||
</phpunit>
|
||||
21
vendor/composer/installers/src/Composer/Installers/AglInstaller.php
vendored
Normal file
21
vendor/composer/installers/src/Composer/Installers/AglInstaller.php
vendored
Normal file
@@ -0,0 +1,21 @@
|
||||
<?php
|
||||
namespace Composer\Installers;
|
||||
|
||||
class AglInstaller extends BaseInstaller
|
||||
{
|
||||
protected $locations = array(
|
||||
'module' => 'More/{$name}/',
|
||||
);
|
||||
|
||||
/**
|
||||
* Format package name to CamelCase
|
||||
*/
|
||||
public function inflectPackageVars($vars)
|
||||
{
|
||||
$vars['name'] = preg_replace_callback('/(?:^|_|-)(.?)/', function ($matches) {
|
||||
return strtoupper($matches[1]);
|
||||
}, $vars['name']);
|
||||
|
||||
return $vars;
|
||||
}
|
||||
}
|
||||
9
vendor/composer/installers/src/Composer/Installers/AimeosInstaller.php
vendored
Normal file
9
vendor/composer/installers/src/Composer/Installers/AimeosInstaller.php
vendored
Normal file
@@ -0,0 +1,9 @@
|
||||
<?php
|
||||
namespace Composer\Installers;
|
||||
|
||||
class AimeosInstaller extends BaseInstaller
|
||||
{
|
||||
protected $locations = array(
|
||||
'extension' => 'ext/{$name}/',
|
||||
);
|
||||
}
|
||||
11
vendor/composer/installers/src/Composer/Installers/AnnotateCmsInstaller.php
vendored
Normal file
11
vendor/composer/installers/src/Composer/Installers/AnnotateCmsInstaller.php
vendored
Normal file
@@ -0,0 +1,11 @@
|
||||
<?php
|
||||
namespace Composer\Installers;
|
||||
|
||||
class AnnotateCmsInstaller extends BaseInstaller
|
||||
{
|
||||
protected $locations = array(
|
||||
'module' => 'addons/modules/{$name}/',
|
||||
'component' => 'addons/components/{$name}/',
|
||||
'service' => 'addons/services/{$name}/',
|
||||
);
|
||||
}
|
||||
49
vendor/composer/installers/src/Composer/Installers/AsgardInstaller.php
vendored
Normal file
49
vendor/composer/installers/src/Composer/Installers/AsgardInstaller.php
vendored
Normal file
@@ -0,0 +1,49 @@
|
||||
<?php
|
||||
namespace Composer\Installers;
|
||||
|
||||
class AsgardInstaller extends BaseInstaller
|
||||
{
|
||||
protected $locations = array(
|
||||
'module' => 'Modules/{$name}/',
|
||||
'theme' => 'Themes/{$name}/'
|
||||
);
|
||||
|
||||
/**
|
||||
* Format package name.
|
||||
*
|
||||
* For package type asgard-module, cut off a trailing '-plugin' if present.
|
||||
*
|
||||
* For package type asgard-theme, cut off a trailing '-theme' if present.
|
||||
*
|
||||
*/
|
||||
public function inflectPackageVars($vars)
|
||||
{
|
||||
if ($vars['type'] === 'asgard-module') {
|
||||
return $this->inflectPluginVars($vars);
|
||||
}
|
||||
|
||||
if ($vars['type'] === 'asgard-theme') {
|
||||
return $this->inflectThemeVars($vars);
|
||||
}
|
||||
|
||||
return $vars;
|
||||
}
|
||||
|
||||
protected function inflectPluginVars($vars)
|
||||
{
|
||||
$vars['name'] = preg_replace('/-module$/', '', $vars['name']);
|
||||
$vars['name'] = str_replace(array('-', '_'), ' ', $vars['name']);
|
||||
$vars['name'] = str_replace(' ', '', ucwords($vars['name']));
|
||||
|
||||
return $vars;
|
||||
}
|
||||
|
||||
protected function inflectThemeVars($vars)
|
||||
{
|
||||
$vars['name'] = preg_replace('/-theme$/', '', $vars['name']);
|
||||
$vars['name'] = str_replace(array('-', '_'), ' ', $vars['name']);
|
||||
$vars['name'] = str_replace(' ', '', ucwords($vars['name']));
|
||||
|
||||
return $vars;
|
||||
}
|
||||
}
|
||||
9
vendor/composer/installers/src/Composer/Installers/AttogramInstaller.php
vendored
Normal file
9
vendor/composer/installers/src/Composer/Installers/AttogramInstaller.php
vendored
Normal file
@@ -0,0 +1,9 @@
|
||||
<?php
|
||||
namespace Composer\Installers;
|
||||
|
||||
class AttogramInstaller extends BaseInstaller
|
||||
{
|
||||
protected $locations = array(
|
||||
'module' => 'modules/{$name}/',
|
||||
);
|
||||
}
|
||||
136
vendor/composer/installers/src/Composer/Installers/BaseInstaller.php
vendored
Normal file
136
vendor/composer/installers/src/Composer/Installers/BaseInstaller.php
vendored
Normal file
@@ -0,0 +1,136 @@
|
||||
<?php
|
||||
namespace Composer\Installers;
|
||||
|
||||
use Composer\IO\IOInterface;
|
||||
use Composer\Composer;
|
||||
use Composer\Package\PackageInterface;
|
||||
|
||||
abstract class BaseInstaller
|
||||
{
|
||||
protected $locations = array();
|
||||
protected $composer;
|
||||
protected $package;
|
||||
protected $io;
|
||||
|
||||
/**
|
||||
* Initializes base installer.
|
||||
*
|
||||
* @param PackageInterface $package
|
||||
* @param Composer $composer
|
||||
* @param IOInterface $io
|
||||
*/
|
||||
public function __construct(PackageInterface $package = null, Composer $composer = null, IOInterface $io = null)
|
||||
{
|
||||
$this->composer = $composer;
|
||||
$this->package = $package;
|
||||
$this->io = $io;
|
||||
}
|
||||
|
||||
/**
|
||||
* Return the install path based on package type.
|
||||
*
|
||||
* @param PackageInterface $package
|
||||
* @param string $frameworkType
|
||||
* @return string
|
||||
*/
|
||||
public function getInstallPath(PackageInterface $package, $frameworkType = '')
|
||||
{
|
||||
$type = $this->package->getType();
|
||||
|
||||
$prettyName = $this->package->getPrettyName();
|
||||
if (strpos($prettyName, '/') !== false) {
|
||||
list($vendor, $name) = explode('/', $prettyName);
|
||||
} else {
|
||||
$vendor = '';
|
||||
$name = $prettyName;
|
||||
}
|
||||
|
||||
$availableVars = $this->inflectPackageVars(compact('name', 'vendor', 'type'));
|
||||
|
||||
$extra = $package->getExtra();
|
||||
if (!empty($extra['installer-name'])) {
|
||||
$availableVars['name'] = $extra['installer-name'];
|
||||
}
|
||||
|
||||
if ($this->composer->getPackage()) {
|
||||
$extra = $this->composer->getPackage()->getExtra();
|
||||
if (!empty($extra['installer-paths'])) {
|
||||
$customPath = $this->mapCustomInstallPaths($extra['installer-paths'], $prettyName, $type, $vendor);
|
||||
if ($customPath !== false) {
|
||||
return $this->templatePath($customPath, $availableVars);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
$packageType = substr($type, strlen($frameworkType) + 1);
|
||||
$locations = $this->getLocations();
|
||||
if (!isset($locations[$packageType])) {
|
||||
throw new \InvalidArgumentException(sprintf('Package type "%s" is not supported', $type));
|
||||
}
|
||||
|
||||
return $this->templatePath($locations[$packageType], $availableVars);
|
||||
}
|
||||
|
||||
/**
|
||||
* For an installer to override to modify the vars per installer.
|
||||
*
|
||||
* @param array $vars
|
||||
* @return array
|
||||
*/
|
||||
public function inflectPackageVars($vars)
|
||||
{
|
||||
return $vars;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the installer's locations
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function getLocations()
|
||||
{
|
||||
return $this->locations;
|
||||
}
|
||||
|
||||
/**
|
||||
* Replace vars in a path
|
||||
*
|
||||
* @param string $path
|
||||
* @param array $vars
|
||||
* @return string
|
||||
*/
|
||||
protected function templatePath($path, array $vars = array())
|
||||
{
|
||||
if (strpos($path, '{') !== false) {
|
||||
extract($vars);
|
||||
preg_match_all('@\{\$([A-Za-z0-9_]*)\}@i', $path, $matches);
|
||||
if (!empty($matches[1])) {
|
||||
foreach ($matches[1] as $var) {
|
||||
$path = str_replace('{$' . $var . '}', $$var, $path);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return $path;
|
||||
}
|
||||
|
||||
/**
|
||||
* Search through a passed paths array for a custom install path.
|
||||
*
|
||||
* @param array $paths
|
||||
* @param string $name
|
||||
* @param string $type
|
||||
* @param string $vendor = NULL
|
||||
* @return string
|
||||
*/
|
||||
protected function mapCustomInstallPaths(array $paths, $name, $type, $vendor = NULL)
|
||||
{
|
||||
foreach ($paths as $path => $names) {
|
||||
if (in_array($name, $names) || in_array('type:' . $type, $names) || in_array('vendor:' . $vendor, $names)) {
|
||||
return $path;
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
}
|
||||
126
vendor/composer/installers/src/Composer/Installers/BitrixInstaller.php
vendored
Normal file
126
vendor/composer/installers/src/Composer/Installers/BitrixInstaller.php
vendored
Normal file
@@ -0,0 +1,126 @@
|
||||
<?php
|
||||
|
||||
namespace Composer\Installers;
|
||||
|
||||
use Composer\Util\Filesystem;
|
||||
|
||||
/**
|
||||
* Installer for Bitrix Framework. Supported types of extensions:
|
||||
* - `bitrix-d7-module` — copy the module to directory `bitrix/modules/<vendor>.<name>`.
|
||||
* - `bitrix-d7-component` — copy the component to directory `bitrix/components/<vendor>/<name>`.
|
||||
* - `bitrix-d7-template` — copy the template to directory `bitrix/templates/<vendor>_<name>`.
|
||||
*
|
||||
* You can set custom path to directory with Bitrix kernel in `composer.json`:
|
||||
*
|
||||
* ```json
|
||||
* {
|
||||
* "extra": {
|
||||
* "bitrix-dir": "s1/bitrix"
|
||||
* }
|
||||
* }
|
||||
* ```
|
||||
*
|
||||
* @author Nik Samokhvalov <nik@samokhvalov.info>
|
||||
* @author Denis Kulichkin <onexhovia@gmail.com>
|
||||
*/
|
||||
class BitrixInstaller extends BaseInstaller
|
||||
{
|
||||
protected $locations = array(
|
||||
'module' => '{$bitrix_dir}/modules/{$name}/', // deprecated, remove on the major release (Backward compatibility will be broken)
|
||||
'component' => '{$bitrix_dir}/components/{$name}/', // deprecated, remove on the major release (Backward compatibility will be broken)
|
||||
'theme' => '{$bitrix_dir}/templates/{$name}/', // deprecated, remove on the major release (Backward compatibility will be broken)
|
||||
'd7-module' => '{$bitrix_dir}/modules/{$vendor}.{$name}/',
|
||||
'd7-component' => '{$bitrix_dir}/components/{$vendor}/{$name}/',
|
||||
'd7-template' => '{$bitrix_dir}/templates/{$vendor}_{$name}/',
|
||||
);
|
||||
|
||||
/**
|
||||
* @var array Storage for informations about duplicates at all the time of installation packages.
|
||||
*/
|
||||
private static $checkedDuplicates = array();
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function inflectPackageVars($vars)
|
||||
{
|
||||
if ($this->composer->getPackage()) {
|
||||
$extra = $this->composer->getPackage()->getExtra();
|
||||
|
||||
if (isset($extra['bitrix-dir'])) {
|
||||
$vars['bitrix_dir'] = $extra['bitrix-dir'];
|
||||
}
|
||||
}
|
||||
|
||||
if (!isset($vars['bitrix_dir'])) {
|
||||
$vars['bitrix_dir'] = 'bitrix';
|
||||
}
|
||||
|
||||
return parent::inflectPackageVars($vars);
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
protected function templatePath($path, array $vars = array())
|
||||
{
|
||||
$templatePath = parent::templatePath($path, $vars);
|
||||
$this->checkDuplicates($templatePath, $vars);
|
||||
|
||||
return $templatePath;
|
||||
}
|
||||
|
||||
/**
|
||||
* Duplicates search packages.
|
||||
*
|
||||
* @param string $path
|
||||
* @param array $vars
|
||||
*/
|
||||
protected function checkDuplicates($path, array $vars = array())
|
||||
{
|
||||
$packageType = substr($vars['type'], strlen('bitrix') + 1);
|
||||
$localDir = explode('/', $vars['bitrix_dir']);
|
||||
array_pop($localDir);
|
||||
$localDir[] = 'local';
|
||||
$localDir = implode('/', $localDir);
|
||||
|
||||
$oldPath = str_replace(
|
||||
array('{$bitrix_dir}', '{$name}'),
|
||||
array($localDir, $vars['name']),
|
||||
$this->locations[$packageType]
|
||||
);
|
||||
|
||||
if (in_array($oldPath, static::$checkedDuplicates)) {
|
||||
return;
|
||||
}
|
||||
|
||||
if ($oldPath !== $path && file_exists($oldPath) && $this->io && $this->io->isInteractive()) {
|
||||
|
||||
$this->io->writeError(' <error>Duplication of packages:</error>');
|
||||
$this->io->writeError(' <info>Package ' . $oldPath . ' will be called instead package ' . $path . '</info>');
|
||||
|
||||
while (true) {
|
||||
switch ($this->io->ask(' <info>Delete ' . $oldPath . ' [y,n,?]?</info> ', '?')) {
|
||||
case 'y':
|
||||
$fs = new Filesystem();
|
||||
$fs->removeDirectory($oldPath);
|
||||
break 2;
|
||||
|
||||
case 'n':
|
||||
break 2;
|
||||
|
||||
case '?':
|
||||
default:
|
||||
$this->io->writeError(array(
|
||||
' y - delete package ' . $oldPath . ' and to continue with the installation',
|
||||
' n - don\'t delete and to continue with the installation',
|
||||
));
|
||||
$this->io->writeError(' ? - print help');
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
static::$checkedDuplicates[] = $oldPath;
|
||||
}
|
||||
}
|
||||
9
vendor/composer/installers/src/Composer/Installers/BonefishInstaller.php
vendored
Normal file
9
vendor/composer/installers/src/Composer/Installers/BonefishInstaller.php
vendored
Normal file
@@ -0,0 +1,9 @@
|
||||
<?php
|
||||
namespace Composer\Installers;
|
||||
|
||||
class BonefishInstaller extends BaseInstaller
|
||||
{
|
||||
protected $locations = array(
|
||||
'package' => 'Packages/{$vendor}/{$name}/'
|
||||
);
|
||||
}
|
||||
82
vendor/composer/installers/src/Composer/Installers/CakePHPInstaller.php
vendored
Normal file
82
vendor/composer/installers/src/Composer/Installers/CakePHPInstaller.php
vendored
Normal file
@@ -0,0 +1,82 @@
|
||||
<?php
|
||||
namespace Composer\Installers;
|
||||
|
||||
use Composer\DependencyResolver\Pool;
|
||||
|
||||
class CakePHPInstaller extends BaseInstaller
|
||||
{
|
||||
protected $locations = array(
|
||||
'plugin' => 'Plugin/{$name}/',
|
||||
);
|
||||
|
||||
/**
|
||||
* Format package name to CamelCase
|
||||
*/
|
||||
public function inflectPackageVars($vars)
|
||||
{
|
||||
if ($this->matchesCakeVersion('>=', '3.0.0')) {
|
||||
return $vars;
|
||||
}
|
||||
|
||||
$nameParts = explode('/', $vars['name']);
|
||||
foreach ($nameParts as &$value) {
|
||||
$value = strtolower(preg_replace('/(?<=\\w)([A-Z])/', '_\\1', $value));
|
||||
$value = str_replace(array('-', '_'), ' ', $value);
|
||||
$value = str_replace(' ', '', ucwords($value));
|
||||
}
|
||||
$vars['name'] = implode('/', $nameParts);
|
||||
|
||||
return $vars;
|
||||
}
|
||||
|
||||
/**
|
||||
* Change the default plugin location when cakephp >= 3.0
|
||||
*/
|
||||
public function getLocations()
|
||||
{
|
||||
if ($this->matchesCakeVersion('>=', '3.0.0')) {
|
||||
$this->locations['plugin'] = $this->composer->getConfig()->get('vendor-dir') . '/{$vendor}/{$name}/';
|
||||
}
|
||||
return $this->locations;
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if CakePHP version matches against a version
|
||||
*
|
||||
* @param string $matcher
|
||||
* @param string $version
|
||||
* @return bool
|
||||
*/
|
||||
protected function matchesCakeVersion($matcher, $version)
|
||||
{
|
||||
if (class_exists('Composer\Semver\Constraint\MultiConstraint')) {
|
||||
$multiClass = 'Composer\Semver\Constraint\MultiConstraint';
|
||||
$constraintClass = 'Composer\Semver\Constraint\Constraint';
|
||||
} else {
|
||||
$multiClass = 'Composer\Package\LinkConstraint\MultiConstraint';
|
||||
$constraintClass = 'Composer\Package\LinkConstraint\VersionConstraint';
|
||||
}
|
||||
|
||||
$repositoryManager = $this->composer->getRepositoryManager();
|
||||
if ($repositoryManager) {
|
||||
$repos = $repositoryManager->getLocalRepository();
|
||||
if (!$repos) {
|
||||
return false;
|
||||
}
|
||||
$cake3 = new $multiClass(array(
|
||||
new $constraintClass($matcher, $version),
|
||||
new $constraintClass('!=', '9999999-dev'),
|
||||
));
|
||||
$pool = new Pool('dev');
|
||||
$pool->addRepository($repos);
|
||||
$packages = $pool->whatProvides('cakephp/cakephp');
|
||||
foreach ($packages as $package) {
|
||||
$installed = new $constraintClass('=', $package->getVersion());
|
||||
if ($cake3->matches($installed)) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
}
|
||||
11
vendor/composer/installers/src/Composer/Installers/ChefInstaller.php
vendored
Normal file
11
vendor/composer/installers/src/Composer/Installers/ChefInstaller.php
vendored
Normal file
@@ -0,0 +1,11 @@
|
||||
<?php
|
||||
namespace Composer\Installers;
|
||||
|
||||
class ChefInstaller extends BaseInstaller
|
||||
{
|
||||
protected $locations = array(
|
||||
'cookbook' => 'Chef/{$vendor}/{$name}/',
|
||||
'role' => 'Chef/roles/{$name}/',
|
||||
);
|
||||
}
|
||||
|
||||
10
vendor/composer/installers/src/Composer/Installers/ClanCatsFrameworkInstaller.php
vendored
Normal file
10
vendor/composer/installers/src/Composer/Installers/ClanCatsFrameworkInstaller.php
vendored
Normal file
@@ -0,0 +1,10 @@
|
||||
<?php
|
||||
namespace Composer\Installers;
|
||||
|
||||
class ClanCatsFrameworkInstaller extends BaseInstaller
|
||||
{
|
||||
protected $locations = array(
|
||||
'ship' => 'CCF/orbit/{$name}/',
|
||||
'theme' => 'CCF/app/themes/{$name}/',
|
||||
);
|
||||
}
|
||||
34
vendor/composer/installers/src/Composer/Installers/CockpitInstaller.php
vendored
Normal file
34
vendor/composer/installers/src/Composer/Installers/CockpitInstaller.php
vendored
Normal file
@@ -0,0 +1,34 @@
|
||||
<?php
|
||||
namespace Composer\Installers;
|
||||
|
||||
class CockpitInstaller extends BaseInstaller
|
||||
{
|
||||
protected $locations = array(
|
||||
'module' => 'cockpit/modules/addons/{$name}/',
|
||||
);
|
||||
|
||||
/**
|
||||
* Format module name.
|
||||
*
|
||||
* Strip `module-` prefix from package name.
|
||||
*
|
||||
* @param array @vars
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function inflectPackageVars($vars)
|
||||
{
|
||||
if ($vars['type'] == 'cockpit-module') {
|
||||
return $this->inflectModuleVars($vars);
|
||||
}
|
||||
|
||||
return $vars;
|
||||
}
|
||||
|
||||
public function inflectModuleVars($vars)
|
||||
{
|
||||
$vars['name'] = ucfirst(preg_replace('/cockpit-/i', '', $vars['name']));
|
||||
|
||||
return $vars;
|
||||
}
|
||||
}
|
||||
11
vendor/composer/installers/src/Composer/Installers/CodeIgniterInstaller.php
vendored
Normal file
11
vendor/composer/installers/src/Composer/Installers/CodeIgniterInstaller.php
vendored
Normal file
@@ -0,0 +1,11 @@
|
||||
<?php
|
||||
namespace Composer\Installers;
|
||||
|
||||
class CodeIgniterInstaller extends BaseInstaller
|
||||
{
|
||||
protected $locations = array(
|
||||
'library' => 'application/libraries/{$name}/',
|
||||
'third-party' => 'application/third_party/{$name}/',
|
||||
'module' => 'application/modules/{$name}/',
|
||||
);
|
||||
}
|
||||
13
vendor/composer/installers/src/Composer/Installers/Concrete5Installer.php
vendored
Normal file
13
vendor/composer/installers/src/Composer/Installers/Concrete5Installer.php
vendored
Normal file
@@ -0,0 +1,13 @@
|
||||
<?php
|
||||
namespace Composer\Installers;
|
||||
|
||||
class Concrete5Installer extends BaseInstaller
|
||||
{
|
||||
protected $locations = array(
|
||||
'core' => 'concrete/',
|
||||
'block' => 'application/blocks/{$name}/',
|
||||
'package' => 'packages/{$name}/',
|
||||
'theme' => 'application/themes/{$name}/',
|
||||
'update' => 'updates/{$name}/',
|
||||
);
|
||||
}
|
||||
35
vendor/composer/installers/src/Composer/Installers/CraftInstaller.php
vendored
Normal file
35
vendor/composer/installers/src/Composer/Installers/CraftInstaller.php
vendored
Normal file
@@ -0,0 +1,35 @@
|
||||
<?php
|
||||
namespace Composer\Installers;
|
||||
|
||||
/**
|
||||
* Installer for Craft Plugins
|
||||
*/
|
||||
class CraftInstaller extends BaseInstaller
|
||||
{
|
||||
const NAME_PREFIX = 'craft';
|
||||
const NAME_SUFFIX = 'plugin';
|
||||
|
||||
protected $locations = array(
|
||||
'plugin' => 'craft/plugins/{$name}/',
|
||||
);
|
||||
|
||||
/**
|
||||
* Strip `craft-` prefix and/or `-plugin` suffix from package names
|
||||
*
|
||||
* @param array $vars
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
final public function inflectPackageVars($vars)
|
||||
{
|
||||
return $this->inflectPluginVars($vars);
|
||||
}
|
||||
|
||||
private function inflectPluginVars($vars)
|
||||
{
|
||||
$vars['name'] = preg_replace('/-' . self::NAME_SUFFIX . '$/i', '', $vars['name']);
|
||||
$vars['name'] = preg_replace('/^' . self::NAME_PREFIX . '-/i', '', $vars['name']);
|
||||
|
||||
return $vars;
|
||||
}
|
||||
}
|
||||
21
vendor/composer/installers/src/Composer/Installers/CroogoInstaller.php
vendored
Normal file
21
vendor/composer/installers/src/Composer/Installers/CroogoInstaller.php
vendored
Normal file
@@ -0,0 +1,21 @@
|
||||
<?php
|
||||
namespace Composer\Installers;
|
||||
|
||||
class CroogoInstaller extends BaseInstaller
|
||||
{
|
||||
protected $locations = array(
|
||||
'plugin' => 'Plugin/{$name}/',
|
||||
'theme' => 'View/Themed/{$name}/',
|
||||
);
|
||||
|
||||
/**
|
||||
* Format package name to CamelCase
|
||||
*/
|
||||
public function inflectPackageVars($vars)
|
||||
{
|
||||
$vars['name'] = strtolower(str_replace(array('-', '_'), ' ', $vars['name']));
|
||||
$vars['name'] = str_replace(' ', '', ucwords($vars['name']));
|
||||
|
||||
return $vars;
|
||||
}
|
||||
}
|
||||
10
vendor/composer/installers/src/Composer/Installers/DecibelInstaller.php
vendored
Normal file
10
vendor/composer/installers/src/Composer/Installers/DecibelInstaller.php
vendored
Normal file
@@ -0,0 +1,10 @@
|
||||
<?php
|
||||
namespace Composer\Installers;
|
||||
|
||||
class DecibelInstaller extends BaseInstaller
|
||||
{
|
||||
/** @var array */
|
||||
protected $locations = array(
|
||||
'app' => 'app/{$name}/',
|
||||
);
|
||||
}
|
||||
50
vendor/composer/installers/src/Composer/Installers/DokuWikiInstaller.php
vendored
Normal file
50
vendor/composer/installers/src/Composer/Installers/DokuWikiInstaller.php
vendored
Normal file
@@ -0,0 +1,50 @@
|
||||
<?php
|
||||
namespace Composer\Installers;
|
||||
|
||||
class DokuWikiInstaller extends BaseInstaller
|
||||
{
|
||||
protected $locations = array(
|
||||
'plugin' => 'lib/plugins/{$name}/',
|
||||
'template' => 'lib/tpl/{$name}/',
|
||||
);
|
||||
|
||||
/**
|
||||
* Format package name.
|
||||
*
|
||||
* For package type dokuwiki-plugin, cut off a trailing '-plugin',
|
||||
* or leading dokuwiki_ if present.
|
||||
*
|
||||
* For package type dokuwiki-template, cut off a trailing '-template' if present.
|
||||
*
|
||||
*/
|
||||
public function inflectPackageVars($vars)
|
||||
{
|
||||
|
||||
if ($vars['type'] === 'dokuwiki-plugin') {
|
||||
return $this->inflectPluginVars($vars);
|
||||
}
|
||||
|
||||
if ($vars['type'] === 'dokuwiki-template') {
|
||||
return $this->inflectTemplateVars($vars);
|
||||
}
|
||||
|
||||
return $vars;
|
||||
}
|
||||
|
||||
protected function inflectPluginVars($vars)
|
||||
{
|
||||
$vars['name'] = preg_replace('/-plugin$/', '', $vars['name']);
|
||||
$vars['name'] = preg_replace('/^dokuwiki_?-?/', '', $vars['name']);
|
||||
|
||||
return $vars;
|
||||
}
|
||||
|
||||
protected function inflectTemplateVars($vars)
|
||||
{
|
||||
$vars['name'] = preg_replace('/-template$/', '', $vars['name']);
|
||||
$vars['name'] = preg_replace('/^dokuwiki_?-?/', '', $vars['name']);
|
||||
|
||||
return $vars;
|
||||
}
|
||||
|
||||
}
|
||||
16
vendor/composer/installers/src/Composer/Installers/DolibarrInstaller.php
vendored
Normal file
16
vendor/composer/installers/src/Composer/Installers/DolibarrInstaller.php
vendored
Normal file
@@ -0,0 +1,16 @@
|
||||
<?php
|
||||
namespace Composer\Installers;
|
||||
|
||||
/**
|
||||
* Class DolibarrInstaller
|
||||
*
|
||||
* @package Composer\Installers
|
||||
* @author Raphaël Doursenaud <rdoursenaud@gpcsolutions.fr>
|
||||
*/
|
||||
class DolibarrInstaller extends BaseInstaller
|
||||
{
|
||||
//TODO: Add support for scripts and themes
|
||||
protected $locations = array(
|
||||
'module' => 'htdocs/custom/{$name}/',
|
||||
);
|
||||
}
|
||||
16
vendor/composer/installers/src/Composer/Installers/DrupalInstaller.php
vendored
Normal file
16
vendor/composer/installers/src/Composer/Installers/DrupalInstaller.php
vendored
Normal file
@@ -0,0 +1,16 @@
|
||||
<?php
|
||||
namespace Composer\Installers;
|
||||
|
||||
class DrupalInstaller extends BaseInstaller
|
||||
{
|
||||
protected $locations = array(
|
||||
'core' => 'core/',
|
||||
'module' => 'modules/{$name}/',
|
||||
'theme' => 'themes/{$name}/',
|
||||
'library' => 'libraries/{$name}/',
|
||||
'profile' => 'profiles/{$name}/',
|
||||
'drush' => 'drush/{$name}/',
|
||||
'custom-theme' => 'themes/custom/{$name}/',
|
||||
'custom-module' => 'modules/custom/{$name}',
|
||||
);
|
||||
}
|
||||
9
vendor/composer/installers/src/Composer/Installers/ElggInstaller.php
vendored
Normal file
9
vendor/composer/installers/src/Composer/Installers/ElggInstaller.php
vendored
Normal file
@@ -0,0 +1,9 @@
|
||||
<?php
|
||||
namespace Composer\Installers;
|
||||
|
||||
class ElggInstaller extends BaseInstaller
|
||||
{
|
||||
protected $locations = array(
|
||||
'plugin' => 'mod/{$name}/',
|
||||
);
|
||||
}
|
||||
12
vendor/composer/installers/src/Composer/Installers/EliasisInstaller.php
vendored
Normal file
12
vendor/composer/installers/src/Composer/Installers/EliasisInstaller.php
vendored
Normal file
@@ -0,0 +1,12 @@
|
||||
<?php
|
||||
namespace Composer\Installers;
|
||||
|
||||
class EliasisInstaller extends BaseInstaller
|
||||
{
|
||||
protected $locations = array(
|
||||
'component' => 'components/{$name}/',
|
||||
'module' => 'modules/{$name}/',
|
||||
'plugin' => 'plugins/{$name}/',
|
||||
'template' => 'templates/{$name}/',
|
||||
);
|
||||
}
|
||||
29
vendor/composer/installers/src/Composer/Installers/ExpressionEngineInstaller.php
vendored
Normal file
29
vendor/composer/installers/src/Composer/Installers/ExpressionEngineInstaller.php
vendored
Normal file
@@ -0,0 +1,29 @@
|
||||
<?php
|
||||
namespace Composer\Installers;
|
||||
|
||||
use Composer\Package\PackageInterface;
|
||||
|
||||
class ExpressionEngineInstaller extends BaseInstaller
|
||||
{
|
||||
|
||||
protected $locations = array();
|
||||
|
||||
private $ee2Locations = array(
|
||||
'addon' => 'system/expressionengine/third_party/{$name}/',
|
||||
'theme' => 'themes/third_party/{$name}/',
|
||||
);
|
||||
|
||||
private $ee3Locations = array(
|
||||
'addon' => 'system/user/addons/{$name}/',
|
||||
'theme' => 'themes/user/{$name}/',
|
||||
);
|
||||
|
||||
public function getInstallPath(PackageInterface $package, $frameworkType = '')
|
||||
{
|
||||
|
||||
$version = "{$frameworkType}Locations";
|
||||
$this->locations = $this->$version;
|
||||
|
||||
return parent::getInstallPath($package, $frameworkType);
|
||||
}
|
||||
}
|
||||
10
vendor/composer/installers/src/Composer/Installers/EzPlatformInstaller.php
vendored
Normal file
10
vendor/composer/installers/src/Composer/Installers/EzPlatformInstaller.php
vendored
Normal file
@@ -0,0 +1,10 @@
|
||||
<?php
|
||||
namespace Composer\Installers;
|
||||
|
||||
class EzPlatformInstaller extends BaseInstaller
|
||||
{
|
||||
protected $locations = array(
|
||||
'meta-assets' => 'web/assets/ezplatform/',
|
||||
'assets' => 'web/assets/ezplatform/{$name}/',
|
||||
);
|
||||
}
|
||||
11
vendor/composer/installers/src/Composer/Installers/FuelInstaller.php
vendored
Normal file
11
vendor/composer/installers/src/Composer/Installers/FuelInstaller.php
vendored
Normal file
@@ -0,0 +1,11 @@
|
||||
<?php
|
||||
namespace Composer\Installers;
|
||||
|
||||
class FuelInstaller extends BaseInstaller
|
||||
{
|
||||
protected $locations = array(
|
||||
'module' => 'fuel/app/modules/{$name}/',
|
||||
'package' => 'fuel/packages/{$name}/',
|
||||
'theme' => 'fuel/app/themes/{$name}/',
|
||||
);
|
||||
}
|
||||
9
vendor/composer/installers/src/Composer/Installers/FuelphpInstaller.php
vendored
Normal file
9
vendor/composer/installers/src/Composer/Installers/FuelphpInstaller.php
vendored
Normal file
@@ -0,0 +1,9 @@
|
||||
<?php
|
||||
namespace Composer\Installers;
|
||||
|
||||
class FuelphpInstaller extends BaseInstaller
|
||||
{
|
||||
protected $locations = array(
|
||||
'component' => 'components/{$name}/',
|
||||
);
|
||||
}
|
||||
30
vendor/composer/installers/src/Composer/Installers/GravInstaller.php
vendored
Normal file
30
vendor/composer/installers/src/Composer/Installers/GravInstaller.php
vendored
Normal file
@@ -0,0 +1,30 @@
|
||||
<?php
|
||||
namespace Composer\Installers;
|
||||
|
||||
class GravInstaller extends BaseInstaller
|
||||
{
|
||||
protected $locations = array(
|
||||
'plugin' => 'user/plugins/{$name}/',
|
||||
'theme' => 'user/themes/{$name}/',
|
||||
);
|
||||
|
||||
/**
|
||||
* Format package name
|
||||
*
|
||||
* @param array $vars
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function inflectPackageVars($vars)
|
||||
{
|
||||
$restrictedWords = implode('|', array_keys($this->locations));
|
||||
|
||||
$vars['name'] = strtolower($vars['name']);
|
||||
$vars['name'] = preg_replace('/^(?:grav-)?(?:(?:'.$restrictedWords.')-)?(.*?)(?:-(?:'.$restrictedWords.'))?$/ui',
|
||||
'$1',
|
||||
$vars['name']
|
||||
);
|
||||
|
||||
return $vars;
|
||||
}
|
||||
}
|
||||
25
vendor/composer/installers/src/Composer/Installers/HuradInstaller.php
vendored
Normal file
25
vendor/composer/installers/src/Composer/Installers/HuradInstaller.php
vendored
Normal file
@@ -0,0 +1,25 @@
|
||||
<?php
|
||||
namespace Composer\Installers;
|
||||
|
||||
class HuradInstaller extends BaseInstaller
|
||||
{
|
||||
protected $locations = array(
|
||||
'plugin' => 'plugins/{$name}/',
|
||||
'theme' => 'plugins/{$name}/',
|
||||
);
|
||||
|
||||
/**
|
||||
* Format package name to CamelCase
|
||||
*/
|
||||
public function inflectPackageVars($vars)
|
||||
{
|
||||
$nameParts = explode('/', $vars['name']);
|
||||
foreach ($nameParts as &$value) {
|
||||
$value = strtolower(preg_replace('/(?<=\\w)([A-Z])/', '_\\1', $value));
|
||||
$value = str_replace(array('-', '_'), ' ', $value);
|
||||
$value = str_replace(' ', '', ucwords($value));
|
||||
}
|
||||
$vars['name'] = implode('/', $nameParts);
|
||||
return $vars;
|
||||
}
|
||||
}
|
||||
11
vendor/composer/installers/src/Composer/Installers/ImageCMSInstaller.php
vendored
Normal file
11
vendor/composer/installers/src/Composer/Installers/ImageCMSInstaller.php
vendored
Normal file
@@ -0,0 +1,11 @@
|
||||
<?php
|
||||
namespace Composer\Installers;
|
||||
|
||||
class ImageCMSInstaller extends BaseInstaller
|
||||
{
|
||||
protected $locations = array(
|
||||
'template' => 'templates/{$name}/',
|
||||
'module' => 'application/modules/{$name}/',
|
||||
'library' => 'application/libraries/{$name}/',
|
||||
);
|
||||
}
|
||||
200
vendor/composer/installers/src/Composer/Installers/Installer.php
vendored
Normal file
200
vendor/composer/installers/src/Composer/Installers/Installer.php
vendored
Normal file
@@ -0,0 +1,200 @@
|
||||
<?php
|
||||
namespace Composer\Installers;
|
||||
|
||||
use Composer\IO\IOInterface;
|
||||
use Composer\Installer\LibraryInstaller;
|
||||
use Composer\Package\PackageInterface;
|
||||
use Composer\Repository\InstalledRepositoryInterface;
|
||||
|
||||
class Installer extends LibraryInstaller
|
||||
{
|
||||
/**
|
||||
* Package types to installer class map
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
private $supportedTypes = array(
|
||||
'aimeos' => 'AimeosInstaller',
|
||||
'asgard' => 'AsgardInstaller',
|
||||
'attogram' => 'AttogramInstaller',
|
||||
'agl' => 'AglInstaller',
|
||||
'annotatecms' => 'AnnotateCmsInstaller',
|
||||
'bitrix' => 'BitrixInstaller',
|
||||
'bonefish' => 'BonefishInstaller',
|
||||
'cakephp' => 'CakePHPInstaller',
|
||||
'chef' => 'ChefInstaller',
|
||||
'ccframework' => 'ClanCatsFrameworkInstaller',
|
||||
'cockpit' => 'CockpitInstaller',
|
||||
'codeigniter' => 'CodeIgniterInstaller',
|
||||
'concrete5' => 'Concrete5Installer',
|
||||
'craft' => 'CraftInstaller',
|
||||
'croogo' => 'CroogoInstaller',
|
||||
'dokuwiki' => 'DokuWikiInstaller',
|
||||
'dolibarr' => 'DolibarrInstaller',
|
||||
'decibel' => 'DecibelInstaller',
|
||||
'drupal' => 'DrupalInstaller',
|
||||
'elgg' => 'ElggInstaller',
|
||||
'eliasis' => 'EliasisInstaller',
|
||||
'ee3' => 'ExpressionEngineInstaller',
|
||||
'ee2' => 'ExpressionEngineInstaller',
|
||||
'ezplatform' => 'EzPlatformInstaller',
|
||||
'fuel' => 'FuelInstaller',
|
||||
'fuelphp' => 'FuelphpInstaller',
|
||||
'grav' => 'GravInstaller',
|
||||
'hurad' => 'HuradInstaller',
|
||||
'imagecms' => 'ImageCMSInstaller',
|
||||
'itop' => 'ItopInstaller',
|
||||
'joomla' => 'JoomlaInstaller',
|
||||
'kanboard' => 'KanboardInstaller',
|
||||
'kirby' => 'KirbyInstaller',
|
||||
'kodicms' => 'KodiCMSInstaller',
|
||||
'kohana' => 'KohanaInstaller',
|
||||
'lms' => 'LanManagementSystemInstaller',
|
||||
'laravel' => 'LaravelInstaller',
|
||||
'lavalite' => 'LavaLiteInstaller',
|
||||
'lithium' => 'LithiumInstaller',
|
||||
'magento' => 'MagentoInstaller',
|
||||
'majima' => 'MajimaInstaller',
|
||||
'mako' => 'MakoInstaller',
|
||||
'maya' => 'MayaInstaller',
|
||||
'mautic' => 'MauticInstaller',
|
||||
'mediawiki' => 'MediaWikiInstaller',
|
||||
'microweber' => 'MicroweberInstaller',
|
||||
'modulework' => 'MODULEWorkInstaller',
|
||||
'modx' => 'ModxInstaller',
|
||||
'modxevo' => 'MODXEvoInstaller',
|
||||
'moodle' => 'MoodleInstaller',
|
||||
'october' => 'OctoberInstaller',
|
||||
'ontowiki' => 'OntoWikiInstaller',
|
||||
'oxid' => 'OxidInstaller',
|
||||
'osclass' => 'OsclassInstaller',
|
||||
'pxcms' => 'PxcmsInstaller',
|
||||
'phpbb' => 'PhpBBInstaller',
|
||||
'pimcore' => 'PimcoreInstaller',
|
||||
'piwik' => 'PiwikInstaller',
|
||||
'plentymarkets'=> 'PlentymarketsInstaller',
|
||||
'ppi' => 'PPIInstaller',
|
||||
'puppet' => 'PuppetInstaller',
|
||||
'radphp' => 'RadPHPInstaller',
|
||||
'phifty' => 'PhiftyInstaller',
|
||||
'porto' => 'PortoInstaller',
|
||||
'redaxo' => 'RedaxoInstaller',
|
||||
'reindex' => 'ReIndexInstaller',
|
||||
'roundcube' => 'RoundcubeInstaller',
|
||||
'shopware' => 'ShopwareInstaller',
|
||||
'sitedirect' => 'SiteDirectInstaller',
|
||||
'silverstripe' => 'SilverStripeInstaller',
|
||||
'smf' => 'SMFInstaller',
|
||||
'sydes' => 'SyDESInstaller',
|
||||
'symfony1' => 'Symfony1Installer',
|
||||
'thelia' => 'TheliaInstaller',
|
||||
'tusk' => 'TuskInstaller',
|
||||
'typo3-cms' => 'TYPO3CmsInstaller',
|
||||
'typo3-flow' => 'TYPO3FlowInstaller',
|
||||
'userfrosting' => 'UserFrostingInstaller',
|
||||
'vanilla' => 'VanillaInstaller',
|
||||
'whmcs' => 'WHMCSInstaller',
|
||||
'wolfcms' => 'WolfCMSInstaller',
|
||||
'wordpress' => 'WordPressInstaller',
|
||||
'yawik' => 'YawikInstaller',
|
||||
'zend' => 'ZendInstaller',
|
||||
'zikula' => 'ZikulaInstaller',
|
||||
'prestashop' => 'PrestashopInstaller'
|
||||
);
|
||||
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*/
|
||||
public function getInstallPath(PackageInterface $package)
|
||||
{
|
||||
$type = $package->getType();
|
||||
$frameworkType = $this->findFrameworkType($type);
|
||||
|
||||
if ($frameworkType === false) {
|
||||
throw new \InvalidArgumentException(
|
||||
'Sorry the package type of this package is not yet supported.'
|
||||
);
|
||||
}
|
||||
|
||||
$class = 'Composer\\Installers\\' . $this->supportedTypes[$frameworkType];
|
||||
$installer = new $class($package, $this->composer, $this->getIO());
|
||||
|
||||
return $installer->getInstallPath($package, $frameworkType);
|
||||
}
|
||||
|
||||
public function uninstall(InstalledRepositoryInterface $repo, PackageInterface $package)
|
||||
{
|
||||
parent::uninstall($repo, $package);
|
||||
$installPath = $this->getPackageBasePath($package);
|
||||
$this->io->write(sprintf('Deleting %s - %s', $installPath, !file_exists($installPath) ? '<comment>deleted</comment>' : '<error>not deleted</error>'));
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*/
|
||||
public function supports($packageType)
|
||||
{
|
||||
$frameworkType = $this->findFrameworkType($packageType);
|
||||
|
||||
if ($frameworkType === false) {
|
||||
return false;
|
||||
}
|
||||
|
||||
$locationPattern = $this->getLocationPattern($frameworkType);
|
||||
|
||||
return preg_match('#' . $frameworkType . '-' . $locationPattern . '#', $packageType, $matches) === 1;
|
||||
}
|
||||
|
||||
/**
|
||||
* Finds a supported framework type if it exists and returns it
|
||||
*
|
||||
* @param string $type
|
||||
* @return string
|
||||
*/
|
||||
protected function findFrameworkType($type)
|
||||
{
|
||||
$frameworkType = false;
|
||||
|
||||
krsort($this->supportedTypes);
|
||||
|
||||
foreach ($this->supportedTypes as $key => $val) {
|
||||
if ($key === substr($type, 0, strlen($key))) {
|
||||
$frameworkType = substr($type, 0, strlen($key));
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
return $frameworkType;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the second part of the regular expression to check for support of a
|
||||
* package type
|
||||
*
|
||||
* @param string $frameworkType
|
||||
* @return string
|
||||
*/
|
||||
protected function getLocationPattern($frameworkType)
|
||||
{
|
||||
$pattern = false;
|
||||
if (!empty($this->supportedTypes[$frameworkType])) {
|
||||
$frameworkClass = 'Composer\\Installers\\' . $this->supportedTypes[$frameworkType];
|
||||
/** @var BaseInstaller $framework */
|
||||
$framework = new $frameworkClass(null, $this->composer, $this->getIO());
|
||||
$locations = array_keys($framework->getLocations());
|
||||
$pattern = $locations ? '(' . implode('|', $locations) . ')' : false;
|
||||
}
|
||||
|
||||
return $pattern ? : '(\w+)';
|
||||
}
|
||||
|
||||
/**
|
||||
* Get I/O object
|
||||
*
|
||||
* @return IOInterface
|
||||
*/
|
||||
private function getIO()
|
||||
{
|
||||
return $this->io;
|
||||
}
|
||||
}
|
||||
9
vendor/composer/installers/src/Composer/Installers/ItopInstaller.php
vendored
Normal file
9
vendor/composer/installers/src/Composer/Installers/ItopInstaller.php
vendored
Normal file
@@ -0,0 +1,9 @@
|
||||
<?php
|
||||
namespace Composer\Installers;
|
||||
|
||||
class ItopInstaller extends BaseInstaller
|
||||
{
|
||||
protected $locations = array(
|
||||
'extension' => 'extensions/{$name}/',
|
||||
);
|
||||
}
|
||||
15
vendor/composer/installers/src/Composer/Installers/JoomlaInstaller.php
vendored
Normal file
15
vendor/composer/installers/src/Composer/Installers/JoomlaInstaller.php
vendored
Normal file
@@ -0,0 +1,15 @@
|
||||
<?php
|
||||
namespace Composer\Installers;
|
||||
|
||||
class JoomlaInstaller extends BaseInstaller
|
||||
{
|
||||
protected $locations = array(
|
||||
'component' => 'components/{$name}/',
|
||||
'module' => 'modules/{$name}/',
|
||||
'template' => 'templates/{$name}/',
|
||||
'plugin' => 'plugins/{$name}/',
|
||||
'library' => 'libraries/{$name}/',
|
||||
);
|
||||
|
||||
// TODO: Add inflector for mod_ and com_ names
|
||||
}
|
||||
18
vendor/composer/installers/src/Composer/Installers/KanboardInstaller.php
vendored
Normal file
18
vendor/composer/installers/src/Composer/Installers/KanboardInstaller.php
vendored
Normal file
@@ -0,0 +1,18 @@
|
||||
<?php
|
||||
namespace Composer\Installers;
|
||||
|
||||
/**
|
||||
*
|
||||
* Installer for kanboard plugins
|
||||
*
|
||||
* kanboard.net
|
||||
*
|
||||
* Class KanboardInstaller
|
||||
* @package Composer\Installers
|
||||
*/
|
||||
class KanboardInstaller extends BaseInstaller
|
||||
{
|
||||
protected $locations = array(
|
||||
'plugin' => 'plugins/{$name}/',
|
||||
);
|
||||
}
|
||||
11
vendor/composer/installers/src/Composer/Installers/KirbyInstaller.php
vendored
Normal file
11
vendor/composer/installers/src/Composer/Installers/KirbyInstaller.php
vendored
Normal file
@@ -0,0 +1,11 @@
|
||||
<?php
|
||||
namespace Composer\Installers;
|
||||
|
||||
class KirbyInstaller extends BaseInstaller
|
||||
{
|
||||
protected $locations = array(
|
||||
'plugin' => 'site/plugins/{$name}/',
|
||||
'field' => 'site/fields/{$name}/',
|
||||
'tag' => 'site/tags/{$name}/'
|
||||
);
|
||||
}
|
||||
10
vendor/composer/installers/src/Composer/Installers/KodiCMSInstaller.php
vendored
Normal file
10
vendor/composer/installers/src/Composer/Installers/KodiCMSInstaller.php
vendored
Normal file
@@ -0,0 +1,10 @@
|
||||
<?php
|
||||
namespace Composer\Installers;
|
||||
|
||||
class KodiCMSInstaller extends BaseInstaller
|
||||
{
|
||||
protected $locations = array(
|
||||
'plugin' => 'cms/plugins/{$name}/',
|
||||
'media' => 'cms/media/vendor/{$name}/'
|
||||
);
|
||||
}
|
||||
9
vendor/composer/installers/src/Composer/Installers/KohanaInstaller.php
vendored
Normal file
9
vendor/composer/installers/src/Composer/Installers/KohanaInstaller.php
vendored
Normal file
@@ -0,0 +1,9 @@
|
||||
<?php
|
||||
namespace Composer\Installers;
|
||||
|
||||
class KohanaInstaller extends BaseInstaller
|
||||
{
|
||||
protected $locations = array(
|
||||
'module' => 'modules/{$name}/',
|
||||
);
|
||||
}
|
||||
27
vendor/composer/installers/src/Composer/Installers/LanManagementSystemInstaller.php
vendored
Normal file
27
vendor/composer/installers/src/Composer/Installers/LanManagementSystemInstaller.php
vendored
Normal file
@@ -0,0 +1,27 @@
|
||||
<?php
|
||||
|
||||
namespace Composer\Installers;
|
||||
|
||||
class LanManagementSystemInstaller extends BaseInstaller
|
||||
{
|
||||
|
||||
protected $locations = array(
|
||||
'plugin' => 'plugins/{$name}/',
|
||||
'template' => 'templates/{$name}/',
|
||||
'document-template' => 'documents/templates/{$name}/',
|
||||
'userpanel-module' => 'userpanel/modules/{$name}/',
|
||||
);
|
||||
|
||||
/**
|
||||
* Format package name to CamelCase
|
||||
*/
|
||||
public function inflectPackageVars($vars)
|
||||
{
|
||||
$vars['name'] = strtolower(preg_replace('/(?<=\\w)([A-Z])/', '_\\1', $vars['name']));
|
||||
$vars['name'] = str_replace(array('-', '_'), ' ', $vars['name']);
|
||||
$vars['name'] = str_replace(' ', '', ucwords($vars['name']));
|
||||
|
||||
return $vars;
|
||||
}
|
||||
|
||||
}
|
||||
9
vendor/composer/installers/src/Composer/Installers/LaravelInstaller.php
vendored
Normal file
9
vendor/composer/installers/src/Composer/Installers/LaravelInstaller.php
vendored
Normal file
@@ -0,0 +1,9 @@
|
||||
<?php
|
||||
namespace Composer\Installers;
|
||||
|
||||
class LaravelInstaller extends BaseInstaller
|
||||
{
|
||||
protected $locations = array(
|
||||
'library' => 'libraries/{$name}/',
|
||||
);
|
||||
}
|
||||
10
vendor/composer/installers/src/Composer/Installers/LavaLiteInstaller.php
vendored
Normal file
10
vendor/composer/installers/src/Composer/Installers/LavaLiteInstaller.php
vendored
Normal file
@@ -0,0 +1,10 @@
|
||||
<?php
|
||||
namespace Composer\Installers;
|
||||
|
||||
class LavaLiteInstaller extends BaseInstaller
|
||||
{
|
||||
protected $locations = array(
|
||||
'package' => 'packages/{$vendor}/{$name}/',
|
||||
'theme' => 'public/themes/{$name}/',
|
||||
);
|
||||
}
|
||||
10
vendor/composer/installers/src/Composer/Installers/LithiumInstaller.php
vendored
Normal file
10
vendor/composer/installers/src/Composer/Installers/LithiumInstaller.php
vendored
Normal file
@@ -0,0 +1,10 @@
|
||||
<?php
|
||||
namespace Composer\Installers;
|
||||
|
||||
class LithiumInstaller extends BaseInstaller
|
||||
{
|
||||
protected $locations = array(
|
||||
'library' => 'libraries/{$name}/',
|
||||
'source' => 'libraries/_source/{$name}/',
|
||||
);
|
||||
}
|
||||
9
vendor/composer/installers/src/Composer/Installers/MODULEWorkInstaller.php
vendored
Normal file
9
vendor/composer/installers/src/Composer/Installers/MODULEWorkInstaller.php
vendored
Normal file
@@ -0,0 +1,9 @@
|
||||
<?php
|
||||
namespace Composer\Installers;
|
||||
|
||||
class MODULEWorkInstaller extends BaseInstaller
|
||||
{
|
||||
protected $locations = array(
|
||||
'module' => 'modules/{$name}/',
|
||||
);
|
||||
}
|
||||
16
vendor/composer/installers/src/Composer/Installers/MODXEvoInstaller.php
vendored
Normal file
16
vendor/composer/installers/src/Composer/Installers/MODXEvoInstaller.php
vendored
Normal file
@@ -0,0 +1,16 @@
|
||||
<?php
|
||||
namespace Composer\Installers;
|
||||
|
||||
/**
|
||||
* An installer to handle MODX Evolution specifics when installing packages.
|
||||
*/
|
||||
class MODXEvoInstaller extends BaseInstaller
|
||||
{
|
||||
protected $locations = array(
|
||||
'snippet' => 'assets/snippets/{$name}/',
|
||||
'plugin' => 'assets/plugins/{$name}/',
|
||||
'module' => 'assets/modules/{$name}/',
|
||||
'template' => 'assets/templates/{$name}/',
|
||||
'lib' => 'assets/lib/{$name}/'
|
||||
);
|
||||
}
|
||||
11
vendor/composer/installers/src/Composer/Installers/MagentoInstaller.php
vendored
Normal file
11
vendor/composer/installers/src/Composer/Installers/MagentoInstaller.php
vendored
Normal file
@@ -0,0 +1,11 @@
|
||||
<?php
|
||||
namespace Composer\Installers;
|
||||
|
||||
class MagentoInstaller extends BaseInstaller
|
||||
{
|
||||
protected $locations = array(
|
||||
'theme' => 'app/design/frontend/{$name}/',
|
||||
'skin' => 'skin/frontend/default/{$name}/',
|
||||
'library' => 'lib/{$name}/',
|
||||
);
|
||||
}
|
||||
37
vendor/composer/installers/src/Composer/Installers/MajimaInstaller.php
vendored
Normal file
37
vendor/composer/installers/src/Composer/Installers/MajimaInstaller.php
vendored
Normal file
@@ -0,0 +1,37 @@
|
||||
<?php
|
||||
namespace Composer\Installers;
|
||||
|
||||
/**
|
||||
* Plugin/theme installer for majima
|
||||
* @author David Neustadt
|
||||
*/
|
||||
class MajimaInstaller extends BaseInstaller
|
||||
{
|
||||
protected $locations = array(
|
||||
'plugin' => 'plugins/{$name}/',
|
||||
);
|
||||
|
||||
/**
|
||||
* Transforms the names
|
||||
* @param array $vars
|
||||
* @return array
|
||||
*/
|
||||
public function inflectPackageVars($vars)
|
||||
{
|
||||
return $this->correctPluginName($vars);
|
||||
}
|
||||
|
||||
/**
|
||||
* Change hyphenated names to camelcase
|
||||
* @param array $vars
|
||||
* @return array
|
||||
*/
|
||||
private function correctPluginName($vars)
|
||||
{
|
||||
$camelCasedName = preg_replace_callback('/(-[a-z])/', function ($matches) {
|
||||
return strtoupper($matches[0][1]);
|
||||
}, $vars['name']);
|
||||
$vars['name'] = ucfirst($camelCasedName);
|
||||
return $vars;
|
||||
}
|
||||
}
|
||||
9
vendor/composer/installers/src/Composer/Installers/MakoInstaller.php
vendored
Normal file
9
vendor/composer/installers/src/Composer/Installers/MakoInstaller.php
vendored
Normal file
@@ -0,0 +1,9 @@
|
||||
<?php
|
||||
namespace Composer\Installers;
|
||||
|
||||
class MakoInstaller extends BaseInstaller
|
||||
{
|
||||
protected $locations = array(
|
||||
'package' => 'app/packages/{$name}/',
|
||||
);
|
||||
}
|
||||
25
vendor/composer/installers/src/Composer/Installers/MauticInstaller.php
vendored
Normal file
25
vendor/composer/installers/src/Composer/Installers/MauticInstaller.php
vendored
Normal file
@@ -0,0 +1,25 @@
|
||||
<?php
|
||||
namespace Composer\Installers;
|
||||
|
||||
class MauticInstaller extends BaseInstaller
|
||||
{
|
||||
protected $locations = array(
|
||||
'plugin' => 'plugins/{$name}/',
|
||||
'theme' => 'themes/{$name}/',
|
||||
);
|
||||
|
||||
/**
|
||||
* Format package name of mautic-plugins to CamelCase
|
||||
*/
|
||||
public function inflectPackageVars($vars)
|
||||
{
|
||||
if ($vars['type'] == 'mautic-plugin') {
|
||||
$vars['name'] = preg_replace_callback('/(-[a-z])/', function ($matches) {
|
||||
return strtoupper($matches[0][1]);
|
||||
}, ucfirst($vars['name']));
|
||||
}
|
||||
|
||||
return $vars;
|
||||
}
|
||||
|
||||
}
|
||||
33
vendor/composer/installers/src/Composer/Installers/MayaInstaller.php
vendored
Normal file
33
vendor/composer/installers/src/Composer/Installers/MayaInstaller.php
vendored
Normal file
@@ -0,0 +1,33 @@
|
||||
<?php
|
||||
namespace Composer\Installers;
|
||||
|
||||
class MayaInstaller extends BaseInstaller
|
||||
{
|
||||
protected $locations = array(
|
||||
'module' => 'modules/{$name}/',
|
||||
);
|
||||
|
||||
/**
|
||||
* Format package name.
|
||||
*
|
||||
* For package type maya-module, cut off a trailing '-module' if present.
|
||||
*
|
||||
*/
|
||||
public function inflectPackageVars($vars)
|
||||
{
|
||||
if ($vars['type'] === 'maya-module') {
|
||||
return $this->inflectModuleVars($vars);
|
||||
}
|
||||
|
||||
return $vars;
|
||||
}
|
||||
|
||||
protected function inflectModuleVars($vars)
|
||||
{
|
||||
$vars['name'] = preg_replace('/-module$/', '', $vars['name']);
|
||||
$vars['name'] = str_replace(array('-', '_'), ' ', $vars['name']);
|
||||
$vars['name'] = str_replace(' ', '', ucwords($vars['name']));
|
||||
|
||||
return $vars;
|
||||
}
|
||||
}
|
||||
50
vendor/composer/installers/src/Composer/Installers/MediaWikiInstaller.php
vendored
Normal file
50
vendor/composer/installers/src/Composer/Installers/MediaWikiInstaller.php
vendored
Normal file
@@ -0,0 +1,50 @@
|
||||
<?php
|
||||
namespace Composer\Installers;
|
||||
|
||||
class MediaWikiInstaller extends BaseInstaller
|
||||
{
|
||||
protected $locations = array(
|
||||
'extension' => 'extensions/{$name}/',
|
||||
'skin' => 'skins/{$name}/',
|
||||
);
|
||||
|
||||
/**
|
||||
* Format package name.
|
||||
*
|
||||
* For package type mediawiki-extension, cut off a trailing '-extension' if present and transform
|
||||
* to CamelCase keeping existing uppercase chars.
|
||||
*
|
||||
* For package type mediawiki-skin, cut off a trailing '-skin' if present.
|
||||
*
|
||||
*/
|
||||
public function inflectPackageVars($vars)
|
||||
{
|
||||
|
||||
if ($vars['type'] === 'mediawiki-extension') {
|
||||
return $this->inflectExtensionVars($vars);
|
||||
}
|
||||
|
||||
if ($vars['type'] === 'mediawiki-skin') {
|
||||
return $this->inflectSkinVars($vars);
|
||||
}
|
||||
|
||||
return $vars;
|
||||
}
|
||||
|
||||
protected function inflectExtensionVars($vars)
|
||||
{
|
||||
$vars['name'] = preg_replace('/-extension$/', '', $vars['name']);
|
||||
$vars['name'] = str_replace('-', ' ', $vars['name']);
|
||||
$vars['name'] = str_replace(' ', '', ucwords($vars['name']));
|
||||
|
||||
return $vars;
|
||||
}
|
||||
|
||||
protected function inflectSkinVars($vars)
|
||||
{
|
||||
$vars['name'] = preg_replace('/-skin$/', '', $vars['name']);
|
||||
|
||||
return $vars;
|
||||
}
|
||||
|
||||
}
|
||||
111
vendor/composer/installers/src/Composer/Installers/MicroweberInstaller.php
vendored
Normal file
111
vendor/composer/installers/src/Composer/Installers/MicroweberInstaller.php
vendored
Normal file
@@ -0,0 +1,111 @@
|
||||
<?php
|
||||
namespace Composer\Installers;
|
||||
|
||||
class MicroweberInstaller extends BaseInstaller
|
||||
{
|
||||
protected $locations = array(
|
||||
'module' => 'userfiles/modules/{$name}/',
|
||||
'module-skin' => 'userfiles/modules/{$name}/templates/',
|
||||
'template' => 'userfiles/templates/{$name}/',
|
||||
'element' => 'userfiles/elements/{$name}/',
|
||||
'vendor' => 'vendor/{$name}/',
|
||||
'components' => 'components/{$name}/'
|
||||
);
|
||||
|
||||
/**
|
||||
* Format package name.
|
||||
*
|
||||
* For package type microweber-module, cut off a trailing '-module' if present
|
||||
*
|
||||
* For package type microweber-template, cut off a trailing '-template' if present.
|
||||
*
|
||||
*/
|
||||
public function inflectPackageVars($vars)
|
||||
{
|
||||
if ($vars['type'] === 'microweber-template') {
|
||||
return $this->inflectTemplateVars($vars);
|
||||
}
|
||||
if ($vars['type'] === 'microweber-templates') {
|
||||
return $this->inflectTemplatesVars($vars);
|
||||
}
|
||||
if ($vars['type'] === 'microweber-core') {
|
||||
return $this->inflectCoreVars($vars);
|
||||
}
|
||||
if ($vars['type'] === 'microweber-adapter') {
|
||||
return $this->inflectCoreVars($vars);
|
||||
}
|
||||
if ($vars['type'] === 'microweber-module') {
|
||||
return $this->inflectModuleVars($vars);
|
||||
}
|
||||
if ($vars['type'] === 'microweber-modules') {
|
||||
return $this->inflectModulesVars($vars);
|
||||
}
|
||||
if ($vars['type'] === 'microweber-skin') {
|
||||
return $this->inflectSkinVars($vars);
|
||||
}
|
||||
if ($vars['type'] === 'microweber-element' or $vars['type'] === 'microweber-elements') {
|
||||
return $this->inflectElementVars($vars);
|
||||
}
|
||||
|
||||
return $vars;
|
||||
}
|
||||
|
||||
protected function inflectTemplateVars($vars)
|
||||
{
|
||||
$vars['name'] = preg_replace('/-template$/', '', $vars['name']);
|
||||
$vars['name'] = preg_replace('/template-$/', '', $vars['name']);
|
||||
|
||||
return $vars;
|
||||
}
|
||||
|
||||
protected function inflectTemplatesVars($vars)
|
||||
{
|
||||
$vars['name'] = preg_replace('/-templates$/', '', $vars['name']);
|
||||
$vars['name'] = preg_replace('/templates-$/', '', $vars['name']);
|
||||
|
||||
return $vars;
|
||||
}
|
||||
|
||||
protected function inflectCoreVars($vars)
|
||||
{
|
||||
$vars['name'] = preg_replace('/-providers$/', '', $vars['name']);
|
||||
$vars['name'] = preg_replace('/-provider$/', '', $vars['name']);
|
||||
$vars['name'] = preg_replace('/-adapter$/', '', $vars['name']);
|
||||
|
||||
return $vars;
|
||||
}
|
||||
|
||||
protected function inflectModuleVars($vars)
|
||||
{
|
||||
$vars['name'] = preg_replace('/-module$/', '', $vars['name']);
|
||||
$vars['name'] = preg_replace('/module-$/', '', $vars['name']);
|
||||
|
||||
return $vars;
|
||||
}
|
||||
|
||||
protected function inflectModulesVars($vars)
|
||||
{
|
||||
$vars['name'] = preg_replace('/-modules$/', '', $vars['name']);
|
||||
$vars['name'] = preg_replace('/modules-$/', '', $vars['name']);
|
||||
|
||||
return $vars;
|
||||
}
|
||||
|
||||
protected function inflectSkinVars($vars)
|
||||
{
|
||||
$vars['name'] = preg_replace('/-skin$/', '', $vars['name']);
|
||||
$vars['name'] = preg_replace('/skin-$/', '', $vars['name']);
|
||||
|
||||
return $vars;
|
||||
}
|
||||
|
||||
protected function inflectElementVars($vars)
|
||||
{
|
||||
$vars['name'] = preg_replace('/-elements$/', '', $vars['name']);
|
||||
$vars['name'] = preg_replace('/elements-$/', '', $vars['name']);
|
||||
$vars['name'] = preg_replace('/-element$/', '', $vars['name']);
|
||||
$vars['name'] = preg_replace('/element-$/', '', $vars['name']);
|
||||
|
||||
return $vars;
|
||||
}
|
||||
}
|
||||
12
vendor/composer/installers/src/Composer/Installers/ModxInstaller.php
vendored
Normal file
12
vendor/composer/installers/src/Composer/Installers/ModxInstaller.php
vendored
Normal file
@@ -0,0 +1,12 @@
|
||||
<?php
|
||||
namespace Composer\Installers;
|
||||
|
||||
/**
|
||||
* An installer to handle MODX specifics when installing packages.
|
||||
*/
|
||||
class ModxInstaller extends BaseInstaller
|
||||
{
|
||||
protected $locations = array(
|
||||
'extra' => 'core/packages/{$name}/'
|
||||
);
|
||||
}
|
||||
57
vendor/composer/installers/src/Composer/Installers/MoodleInstaller.php
vendored
Normal file
57
vendor/composer/installers/src/Composer/Installers/MoodleInstaller.php
vendored
Normal file
@@ -0,0 +1,57 @@
|
||||
<?php
|
||||
namespace Composer\Installers;
|
||||
|
||||
class MoodleInstaller extends BaseInstaller
|
||||
{
|
||||
protected $locations = array(
|
||||
'mod' => 'mod/{$name}/',
|
||||
'admin_report' => 'admin/report/{$name}/',
|
||||
'atto' => 'lib/editor/atto/plugins/{$name}/',
|
||||
'tool' => 'admin/tool/{$name}/',
|
||||
'assignment' => 'mod/assignment/type/{$name}/',
|
||||
'assignsubmission' => 'mod/assign/submission/{$name}/',
|
||||
'assignfeedback' => 'mod/assign/feedback/{$name}/',
|
||||
'auth' => 'auth/{$name}/',
|
||||
'availability' => 'availability/condition/{$name}/',
|
||||
'block' => 'blocks/{$name}/',
|
||||
'booktool' => 'mod/book/tool/{$name}/',
|
||||
'cachestore' => 'cache/stores/{$name}/',
|
||||
'cachelock' => 'cache/locks/{$name}/',
|
||||
'calendartype' => 'calendar/type/{$name}/',
|
||||
'format' => 'course/format/{$name}/',
|
||||
'coursereport' => 'course/report/{$name}/',
|
||||
'datafield' => 'mod/data/field/{$name}/',
|
||||
'datapreset' => 'mod/data/preset/{$name}/',
|
||||
'editor' => 'lib/editor/{$name}/',
|
||||
'enrol' => 'enrol/{$name}/',
|
||||
'filter' => 'filter/{$name}/',
|
||||
'gradeexport' => 'grade/export/{$name}/',
|
||||
'gradeimport' => 'grade/import/{$name}/',
|
||||
'gradereport' => 'grade/report/{$name}/',
|
||||
'gradingform' => 'grade/grading/form/{$name}/',
|
||||
'local' => 'local/{$name}/',
|
||||
'logstore' => 'admin/tool/log/store/{$name}/',
|
||||
'ltisource' => 'mod/lti/source/{$name}/',
|
||||
'ltiservice' => 'mod/lti/service/{$name}/',
|
||||
'message' => 'message/output/{$name}/',
|
||||
'mnetservice' => 'mnet/service/{$name}/',
|
||||
'plagiarism' => 'plagiarism/{$name}/',
|
||||
'portfolio' => 'portfolio/{$name}/',
|
||||
'qbehaviour' => 'question/behaviour/{$name}/',
|
||||
'qformat' => 'question/format/{$name}/',
|
||||
'qtype' => 'question/type/{$name}/',
|
||||
'quizaccess' => 'mod/quiz/accessrule/{$name}/',
|
||||
'quiz' => 'mod/quiz/report/{$name}/',
|
||||
'report' => 'report/{$name}/',
|
||||
'repository' => 'repository/{$name}/',
|
||||
'scormreport' => 'mod/scorm/report/{$name}/',
|
||||
'search' => 'search/engine/{$name}/',
|
||||
'theme' => 'theme/{$name}/',
|
||||
'tinymce' => 'lib/editor/tinymce/plugins/{$name}/',
|
||||
'profilefield' => 'user/profile/field/{$name}/',
|
||||
'webservice' => 'webservice/{$name}/',
|
||||
'workshopallocation' => 'mod/workshop/allocation/{$name}/',
|
||||
'workshopeval' => 'mod/workshop/eval/{$name}/',
|
||||
'workshopform' => 'mod/workshop/form/{$name}/'
|
||||
);
|
||||
}
|
||||
46
vendor/composer/installers/src/Composer/Installers/OctoberInstaller.php
vendored
Normal file
46
vendor/composer/installers/src/Composer/Installers/OctoberInstaller.php
vendored
Normal file
@@ -0,0 +1,46 @@
|
||||
<?php
|
||||
namespace Composer\Installers;
|
||||
|
||||
class OctoberInstaller extends BaseInstaller
|
||||
{
|
||||
protected $locations = array(
|
||||
'module' => 'modules/{$name}/',
|
||||
'plugin' => 'plugins/{$vendor}/{$name}/',
|
||||
'theme' => 'themes/{$name}/'
|
||||
);
|
||||
|
||||
/**
|
||||
* Format package name.
|
||||
*
|
||||
* For package type october-plugin, cut off a trailing '-plugin' if present.
|
||||
*
|
||||
* For package type october-theme, cut off a trailing '-theme' if present.
|
||||
*
|
||||
*/
|
||||
public function inflectPackageVars($vars)
|
||||
{
|
||||
if ($vars['type'] === 'october-plugin') {
|
||||
return $this->inflectPluginVars($vars);
|
||||
}
|
||||
|
||||
if ($vars['type'] === 'october-theme') {
|
||||
return $this->inflectThemeVars($vars);
|
||||
}
|
||||
|
||||
return $vars;
|
||||
}
|
||||
|
||||
protected function inflectPluginVars($vars)
|
||||
{
|
||||
$vars['name'] = preg_replace('/^oc-|-plugin$/', '', $vars['name']);
|
||||
|
||||
return $vars;
|
||||
}
|
||||
|
||||
protected function inflectThemeVars($vars)
|
||||
{
|
||||
$vars['name'] = preg_replace('/^oc-|-theme$/', '', $vars['name']);
|
||||
|
||||
return $vars;
|
||||
}
|
||||
}
|
||||
24
vendor/composer/installers/src/Composer/Installers/OntoWikiInstaller.php
vendored
Normal file
24
vendor/composer/installers/src/Composer/Installers/OntoWikiInstaller.php
vendored
Normal file
@@ -0,0 +1,24 @@
|
||||
<?php
|
||||
namespace Composer\Installers;
|
||||
|
||||
class OntoWikiInstaller extends BaseInstaller
|
||||
{
|
||||
protected $locations = array(
|
||||
'extension' => 'extensions/{$name}/',
|
||||
'theme' => 'extensions/themes/{$name}/',
|
||||
'translation' => 'extensions/translations/{$name}/',
|
||||
);
|
||||
|
||||
/**
|
||||
* Format package name to lower case and remove ".ontowiki" suffix
|
||||
*/
|
||||
public function inflectPackageVars($vars)
|
||||
{
|
||||
$vars['name'] = strtolower($vars['name']);
|
||||
$vars['name'] = preg_replace('/.ontowiki$/', '', $vars['name']);
|
||||
$vars['name'] = preg_replace('/-theme$/', '', $vars['name']);
|
||||
$vars['name'] = preg_replace('/-translation$/', '', $vars['name']);
|
||||
|
||||
return $vars;
|
||||
}
|
||||
}
|
||||
14
vendor/composer/installers/src/Composer/Installers/OsclassInstaller.php
vendored
Normal file
14
vendor/composer/installers/src/Composer/Installers/OsclassInstaller.php
vendored
Normal file
@@ -0,0 +1,14 @@
|
||||
<?php
|
||||
namespace Composer\Installers;
|
||||
|
||||
|
||||
class OsclassInstaller extends BaseInstaller
|
||||
{
|
||||
|
||||
protected $locations = array(
|
||||
'plugin' => 'oc-content/plugins/{$name}/',
|
||||
'theme' => 'oc-content/themes/{$name}/',
|
||||
'language' => 'oc-content/languages/{$name}/',
|
||||
);
|
||||
|
||||
}
|
||||
59
vendor/composer/installers/src/Composer/Installers/OxidInstaller.php
vendored
Normal file
59
vendor/composer/installers/src/Composer/Installers/OxidInstaller.php
vendored
Normal file
@@ -0,0 +1,59 @@
|
||||
<?php
|
||||
namespace Composer\Installers;
|
||||
|
||||
use Composer\Package\PackageInterface;
|
||||
|
||||
class OxidInstaller extends BaseInstaller
|
||||
{
|
||||
const VENDOR_PATTERN = '/^modules\/(?P<vendor>.+)\/.+/';
|
||||
|
||||
protected $locations = array(
|
||||
'module' => 'modules/{$name}/',
|
||||
'theme' => 'application/views/{$name}/',
|
||||
'out' => 'out/{$name}/',
|
||||
);
|
||||
|
||||
/**
|
||||
* getInstallPath
|
||||
*
|
||||
* @param PackageInterface $package
|
||||
* @param string $frameworkType
|
||||
* @return void
|
||||
*/
|
||||
public function getInstallPath(PackageInterface $package, $frameworkType = '')
|
||||
{
|
||||
$installPath = parent::getInstallPath($package, $frameworkType);
|
||||
$type = $this->package->getType();
|
||||
if ($type === 'oxid-module') {
|
||||
$this->prepareVendorDirectory($installPath);
|
||||
}
|
||||
return $installPath;
|
||||
}
|
||||
|
||||
/**
|
||||
* prepareVendorDirectory
|
||||
*
|
||||
* Makes sure there is a vendormetadata.php file inside
|
||||
* the vendor folder if there is a vendor folder.
|
||||
*
|
||||
* @param string $installPath
|
||||
* @return void
|
||||
*/
|
||||
protected function prepareVendorDirectory($installPath)
|
||||
{
|
||||
$matches = '';
|
||||
$hasVendorDirectory = preg_match(self::VENDOR_PATTERN, $installPath, $matches);
|
||||
if (!$hasVendorDirectory) {
|
||||
return;
|
||||
}
|
||||
|
||||
$vendorDirectory = $matches['vendor'];
|
||||
$vendorPath = getcwd() . '/modules/' . $vendorDirectory;
|
||||
if (!file_exists($vendorPath)) {
|
||||
mkdir($vendorPath, 0755, true);
|
||||
}
|
||||
|
||||
$vendorMetaDataPath = $vendorPath . '/vendormetadata.php';
|
||||
touch($vendorMetaDataPath);
|
||||
}
|
||||
}
|
||||
9
vendor/composer/installers/src/Composer/Installers/PPIInstaller.php
vendored
Normal file
9
vendor/composer/installers/src/Composer/Installers/PPIInstaller.php
vendored
Normal file
@@ -0,0 +1,9 @@
|
||||
<?php
|
||||
namespace Composer\Installers;
|
||||
|
||||
class PPIInstaller extends BaseInstaller
|
||||
{
|
||||
protected $locations = array(
|
||||
'module' => 'modules/{$name}/',
|
||||
);
|
||||
}
|
||||
11
vendor/composer/installers/src/Composer/Installers/PhiftyInstaller.php
vendored
Normal file
11
vendor/composer/installers/src/Composer/Installers/PhiftyInstaller.php
vendored
Normal file
@@ -0,0 +1,11 @@
|
||||
<?php
|
||||
namespace Composer\Installers;
|
||||
|
||||
class PhiftyInstaller extends BaseInstaller
|
||||
{
|
||||
protected $locations = array(
|
||||
'bundle' => 'bundles/{$name}/',
|
||||
'library' => 'libraries/{$name}/',
|
||||
'framework' => 'frameworks/{$name}/',
|
||||
);
|
||||
}
|
||||
11
vendor/composer/installers/src/Composer/Installers/PhpBBInstaller.php
vendored
Normal file
11
vendor/composer/installers/src/Composer/Installers/PhpBBInstaller.php
vendored
Normal file
@@ -0,0 +1,11 @@
|
||||
<?php
|
||||
namespace Composer\Installers;
|
||||
|
||||
class PhpBBInstaller extends BaseInstaller
|
||||
{
|
||||
protected $locations = array(
|
||||
'extension' => 'ext/{$vendor}/{$name}/',
|
||||
'language' => 'language/{$name}/',
|
||||
'style' => 'styles/{$name}/',
|
||||
);
|
||||
}
|
||||
21
vendor/composer/installers/src/Composer/Installers/PimcoreInstaller.php
vendored
Normal file
21
vendor/composer/installers/src/Composer/Installers/PimcoreInstaller.php
vendored
Normal file
@@ -0,0 +1,21 @@
|
||||
<?php
|
||||
namespace Composer\Installers;
|
||||
|
||||
class PimcoreInstaller extends BaseInstaller
|
||||
{
|
||||
protected $locations = array(
|
||||
'plugin' => 'plugins/{$name}/',
|
||||
);
|
||||
|
||||
/**
|
||||
* Format package name to CamelCase
|
||||
*/
|
||||
public function inflectPackageVars($vars)
|
||||
{
|
||||
$vars['name'] = strtolower(preg_replace('/(?<=\\w)([A-Z])/', '_\\1', $vars['name']));
|
||||
$vars['name'] = str_replace(array('-', '_'), ' ', $vars['name']);
|
||||
$vars['name'] = str_replace(' ', '', ucwords($vars['name']));
|
||||
|
||||
return $vars;
|
||||
}
|
||||
}
|
||||
32
vendor/composer/installers/src/Composer/Installers/PiwikInstaller.php
vendored
Normal file
32
vendor/composer/installers/src/Composer/Installers/PiwikInstaller.php
vendored
Normal file
@@ -0,0 +1,32 @@
|
||||
<?php
|
||||
namespace Composer\Installers;
|
||||
|
||||
/**
|
||||
* Class PiwikInstaller
|
||||
*
|
||||
* @package Composer\Installers
|
||||
*/
|
||||
class PiwikInstaller extends BaseInstaller
|
||||
{
|
||||
/**
|
||||
* @var array
|
||||
*/
|
||||
protected $locations = array(
|
||||
'plugin' => 'plugins/{$name}/',
|
||||
);
|
||||
|
||||
/**
|
||||
* Format package name to CamelCase
|
||||
* @param array $vars
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function inflectPackageVars($vars)
|
||||
{
|
||||
$vars['name'] = strtolower(preg_replace('/(?<=\\w)([A-Z])/', '_\\1', $vars['name']));
|
||||
$vars['name'] = str_replace(array('-', '_'), ' ', $vars['name']);
|
||||
$vars['name'] = str_replace(' ', '', ucwords($vars['name']));
|
||||
|
||||
return $vars;
|
||||
}
|
||||
}
|
||||
29
vendor/composer/installers/src/Composer/Installers/PlentymarketsInstaller.php
vendored
Normal file
29
vendor/composer/installers/src/Composer/Installers/PlentymarketsInstaller.php
vendored
Normal file
@@ -0,0 +1,29 @@
|
||||
<?php
|
||||
namespace Composer\Installers;
|
||||
|
||||
class PlentymarketsInstaller extends BaseInstaller
|
||||
{
|
||||
protected $locations = array(
|
||||
'plugin' => '{$name}/'
|
||||
);
|
||||
|
||||
/**
|
||||
* Remove hyphen, "plugin" and format to camelcase
|
||||
* @param array $vars
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function inflectPackageVars($vars)
|
||||
{
|
||||
$vars['name'] = explode("-", $vars['name']);
|
||||
foreach ($vars['name'] as $key => $name) {
|
||||
$vars['name'][$key] = ucfirst($vars['name'][$key]);
|
||||
if (strcasecmp($name, "Plugin") == 0) {
|
||||
unset($vars['name'][$key]);
|
||||
}
|
||||
}
|
||||
$vars['name'] = implode("",$vars['name']);
|
||||
|
||||
return $vars;
|
||||
}
|
||||
}
|
||||
17
vendor/composer/installers/src/Composer/Installers/Plugin.php
vendored
Normal file
17
vendor/composer/installers/src/Composer/Installers/Plugin.php
vendored
Normal file
@@ -0,0 +1,17 @@
|
||||
<?php
|
||||
|
||||
namespace Composer\Installers;
|
||||
|
||||
use Composer\Composer;
|
||||
use Composer\IO\IOInterface;
|
||||
use Composer\Plugin\PluginInterface;
|
||||
|
||||
class Plugin implements PluginInterface
|
||||
{
|
||||
|
||||
public function activate(Composer $composer, IOInterface $io)
|
||||
{
|
||||
$installer = new Installer($io, $composer);
|
||||
$composer->getInstallationManager()->addInstaller($installer);
|
||||
}
|
||||
}
|
||||
9
vendor/composer/installers/src/Composer/Installers/PortoInstaller.php
vendored
Normal file
9
vendor/composer/installers/src/Composer/Installers/PortoInstaller.php
vendored
Normal file
@@ -0,0 +1,9 @@
|
||||
<?php
|
||||
namespace Composer\Installers;
|
||||
|
||||
class PortoInstaller extends BaseInstaller
|
||||
{
|
||||
protected $locations = array(
|
||||
'container' => 'app/Containers/{$name}/',
|
||||
);
|
||||
}
|
||||
10
vendor/composer/installers/src/Composer/Installers/PrestashopInstaller.php
vendored
Normal file
10
vendor/composer/installers/src/Composer/Installers/PrestashopInstaller.php
vendored
Normal file
@@ -0,0 +1,10 @@
|
||||
<?php
|
||||
namespace Composer\Installers;
|
||||
|
||||
class PrestashopInstaller extends BaseInstaller
|
||||
{
|
||||
protected $locations = array(
|
||||
'module' => 'modules/{$name}/',
|
||||
'theme' => 'themes/{$name}/',
|
||||
);
|
||||
}
|
||||
11
vendor/composer/installers/src/Composer/Installers/PuppetInstaller.php
vendored
Normal file
11
vendor/composer/installers/src/Composer/Installers/PuppetInstaller.php
vendored
Normal file
@@ -0,0 +1,11 @@
|
||||
<?php
|
||||
|
||||
namespace Composer\Installers;
|
||||
|
||||
class PuppetInstaller extends BaseInstaller
|
||||
{
|
||||
|
||||
protected $locations = array(
|
||||
'module' => 'modules/{$name}/',
|
||||
);
|
||||
}
|
||||
63
vendor/composer/installers/src/Composer/Installers/PxcmsInstaller.php
vendored
Normal file
63
vendor/composer/installers/src/Composer/Installers/PxcmsInstaller.php
vendored
Normal file
@@ -0,0 +1,63 @@
|
||||
<?php
|
||||
namespace Composer\Installers;
|
||||
|
||||
class PxcmsInstaller extends BaseInstaller
|
||||
{
|
||||
protected $locations = array(
|
||||
'module' => 'app/Modules/{$name}/',
|
||||
'theme' => 'themes/{$name}/',
|
||||
);
|
||||
|
||||
/**
|
||||
* Format package name.
|
||||
*
|
||||
* @param array $vars
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function inflectPackageVars($vars)
|
||||
{
|
||||
if ($vars['type'] === 'pxcms-module') {
|
||||
return $this->inflectModuleVars($vars);
|
||||
}
|
||||
|
||||
if ($vars['type'] === 'pxcms-theme') {
|
||||
return $this->inflectThemeVars($vars);
|
||||
}
|
||||
|
||||
return $vars;
|
||||
}
|
||||
|
||||
/**
|
||||
* For package type pxcms-module, cut off a trailing '-plugin' if present.
|
||||
*
|
||||
* return string
|
||||
*/
|
||||
protected function inflectModuleVars($vars)
|
||||
{
|
||||
$vars['name'] = str_replace('pxcms-', '', $vars['name']); // strip out pxcms- just incase (legacy)
|
||||
$vars['name'] = str_replace('module-', '', $vars['name']); // strip out module-
|
||||
$vars['name'] = preg_replace('/-module$/', '', $vars['name']); // strip out -module
|
||||
$vars['name'] = str_replace('-', '_', $vars['name']); // make -'s be _'s
|
||||
$vars['name'] = ucwords($vars['name']); // make module name camelcased
|
||||
|
||||
return $vars;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* For package type pxcms-module, cut off a trailing '-plugin' if present.
|
||||
*
|
||||
* return string
|
||||
*/
|
||||
protected function inflectThemeVars($vars)
|
||||
{
|
||||
$vars['name'] = str_replace('pxcms-', '', $vars['name']); // strip out pxcms- just incase (legacy)
|
||||
$vars['name'] = str_replace('theme-', '', $vars['name']); // strip out theme-
|
||||
$vars['name'] = preg_replace('/-theme$/', '', $vars['name']); // strip out -theme
|
||||
$vars['name'] = str_replace('-', '_', $vars['name']); // make -'s be _'s
|
||||
$vars['name'] = ucwords($vars['name']); // make module name camelcased
|
||||
|
||||
return $vars;
|
||||
}
|
||||
}
|
||||
24
vendor/composer/installers/src/Composer/Installers/RadPHPInstaller.php
vendored
Normal file
24
vendor/composer/installers/src/Composer/Installers/RadPHPInstaller.php
vendored
Normal file
@@ -0,0 +1,24 @@
|
||||
<?php
|
||||
namespace Composer\Installers;
|
||||
|
||||
class RadPHPInstaller extends BaseInstaller
|
||||
{
|
||||
protected $locations = array(
|
||||
'bundle' => 'src/{$name}/'
|
||||
);
|
||||
|
||||
/**
|
||||
* Format package name to CamelCase
|
||||
*/
|
||||
public function inflectPackageVars($vars)
|
||||
{
|
||||
$nameParts = explode('/', $vars['name']);
|
||||
foreach ($nameParts as &$value) {
|
||||
$value = strtolower(preg_replace('/(?<=\\w)([A-Z])/', '_\\1', $value));
|
||||
$value = str_replace(array('-', '_'), ' ', $value);
|
||||
$value = str_replace(' ', '', ucwords($value));
|
||||
}
|
||||
$vars['name'] = implode('/', $nameParts);
|
||||
return $vars;
|
||||
}
|
||||
}
|
||||
10
vendor/composer/installers/src/Composer/Installers/ReIndexInstaller.php
vendored
Normal file
10
vendor/composer/installers/src/Composer/Installers/ReIndexInstaller.php
vendored
Normal file
@@ -0,0 +1,10 @@
|
||||
<?php
|
||||
namespace Composer\Installers;
|
||||
|
||||
class ReIndexInstaller extends BaseInstaller
|
||||
{
|
||||
protected $locations = array(
|
||||
'theme' => 'themes/{$name}/',
|
||||
'plugin' => 'plugins/{$name}/'
|
||||
);
|
||||
}
|
||||
10
vendor/composer/installers/src/Composer/Installers/RedaxoInstaller.php
vendored
Normal file
10
vendor/composer/installers/src/Composer/Installers/RedaxoInstaller.php
vendored
Normal file
@@ -0,0 +1,10 @@
|
||||
<?php
|
||||
namespace Composer\Installers;
|
||||
|
||||
class RedaxoInstaller extends BaseInstaller
|
||||
{
|
||||
protected $locations = array(
|
||||
'addon' => 'redaxo/include/addons/{$name}/',
|
||||
'bestyle-plugin' => 'redaxo/include/addons/be_style/plugins/{$name}/'
|
||||
);
|
||||
}
|
||||
22
vendor/composer/installers/src/Composer/Installers/RoundcubeInstaller.php
vendored
Normal file
22
vendor/composer/installers/src/Composer/Installers/RoundcubeInstaller.php
vendored
Normal file
@@ -0,0 +1,22 @@
|
||||
<?php
|
||||
namespace Composer\Installers;
|
||||
|
||||
class RoundcubeInstaller extends BaseInstaller
|
||||
{
|
||||
protected $locations = array(
|
||||
'plugin' => 'plugins/{$name}/',
|
||||
);
|
||||
|
||||
/**
|
||||
* Lowercase name and changes the name to a underscores
|
||||
*
|
||||
* @param array $vars
|
||||
* @return array
|
||||
*/
|
||||
public function inflectPackageVars($vars)
|
||||
{
|
||||
$vars['name'] = strtolower(str_replace('-', '_', $vars['name']));
|
||||
|
||||
return $vars;
|
||||
}
|
||||
}
|
||||
10
vendor/composer/installers/src/Composer/Installers/SMFInstaller.php
vendored
Normal file
10
vendor/composer/installers/src/Composer/Installers/SMFInstaller.php
vendored
Normal file
@@ -0,0 +1,10 @@
|
||||
<?php
|
||||
namespace Composer\Installers;
|
||||
|
||||
class SMFInstaller extends BaseInstaller
|
||||
{
|
||||
protected $locations = array(
|
||||
'module' => 'Sources/{$name}/',
|
||||
'theme' => 'Themes/{$name}/',
|
||||
);
|
||||
}
|
||||
60
vendor/composer/installers/src/Composer/Installers/ShopwareInstaller.php
vendored
Normal file
60
vendor/composer/installers/src/Composer/Installers/ShopwareInstaller.php
vendored
Normal file
@@ -0,0 +1,60 @@
|
||||
<?php
|
||||
namespace Composer\Installers;
|
||||
|
||||
/**
|
||||
* Plugin/theme installer for shopware
|
||||
* @author Benjamin Boit
|
||||
*/
|
||||
class ShopwareInstaller extends BaseInstaller
|
||||
{
|
||||
protected $locations = array(
|
||||
'backend-plugin' => 'engine/Shopware/Plugins/Local/Backend/{$name}/',
|
||||
'core-plugin' => 'engine/Shopware/Plugins/Local/Core/{$name}/',
|
||||
'frontend-plugin' => 'engine/Shopware/Plugins/Local/Frontend/{$name}/',
|
||||
'theme' => 'templates/{$name}/',
|
||||
'plugin' => 'custom/plugins/{$name}/',
|
||||
'frontend-theme' => 'themes/Frontend/{$name}/',
|
||||
);
|
||||
|
||||
/**
|
||||
* Transforms the names
|
||||
* @param array $vars
|
||||
* @return array
|
||||
*/
|
||||
public function inflectPackageVars($vars)
|
||||
{
|
||||
if ($vars['type'] === 'shopware-theme') {
|
||||
return $this->correctThemeName($vars);
|
||||
}
|
||||
|
||||
return $this->correctPluginName($vars);
|
||||
}
|
||||
|
||||
/**
|
||||
* Changes the name to a camelcased combination of vendor and name
|
||||
* @param array $vars
|
||||
* @return array
|
||||
*/
|
||||
private function correctPluginName($vars)
|
||||
{
|
||||
$camelCasedName = preg_replace_callback('/(-[a-z])/', function ($matches) {
|
||||
return strtoupper($matches[0][1]);
|
||||
}, $vars['name']);
|
||||
|
||||
$vars['name'] = ucfirst($vars['vendor']) . ucfirst($camelCasedName);
|
||||
|
||||
return $vars;
|
||||
}
|
||||
|
||||
/**
|
||||
* Changes the name to a underscore separated name
|
||||
* @param array $vars
|
||||
* @return array
|
||||
*/
|
||||
private function correctThemeName($vars)
|
||||
{
|
||||
$vars['name'] = str_replace('-', '_', $vars['name']);
|
||||
|
||||
return $vars;
|
||||
}
|
||||
}
|
||||
35
vendor/composer/installers/src/Composer/Installers/SilverStripeInstaller.php
vendored
Normal file
35
vendor/composer/installers/src/Composer/Installers/SilverStripeInstaller.php
vendored
Normal file
@@ -0,0 +1,35 @@
|
||||
<?php
|
||||
namespace Composer\Installers;
|
||||
|
||||
use Composer\Package\PackageInterface;
|
||||
|
||||
class SilverStripeInstaller extends BaseInstaller
|
||||
{
|
||||
protected $locations = array(
|
||||
'module' => '{$name}/',
|
||||
'theme' => 'themes/{$name}/',
|
||||
);
|
||||
|
||||
/**
|
||||
* Return the install path based on package type.
|
||||
*
|
||||
* Relies on built-in BaseInstaller behaviour with one exception: silverstripe/framework
|
||||
* must be installed to 'sapphire' and not 'framework' if the version is <3.0.0
|
||||
*
|
||||
* @param PackageInterface $package
|
||||
* @param string $frameworkType
|
||||
* @return string
|
||||
*/
|
||||
public function getInstallPath(PackageInterface $package, $frameworkType = '')
|
||||
{
|
||||
if (
|
||||
$package->getName() == 'silverstripe/framework'
|
||||
&& preg_match('/^\d+\.\d+\.\d+/', $package->getVersion())
|
||||
&& version_compare($package->getVersion(), '2.999.999') < 0
|
||||
) {
|
||||
return $this->templatePath($this->locations['module'], array('name' => 'sapphire'));
|
||||
}
|
||||
|
||||
return parent::getInstallPath($package, $frameworkType);
|
||||
}
|
||||
}
|
||||
25
vendor/composer/installers/src/Composer/Installers/SiteDirectInstaller.php
vendored
Normal file
25
vendor/composer/installers/src/Composer/Installers/SiteDirectInstaller.php
vendored
Normal file
@@ -0,0 +1,25 @@
|
||||
<?php
|
||||
|
||||
namespace Composer\Installers;
|
||||
|
||||
class SiteDirectInstaller extends BaseInstaller
|
||||
{
|
||||
protected $locations = array(
|
||||
'module' => 'modules/{$vendor}/{$name}/',
|
||||
'plugin' => 'plugins/{$vendor}/{$name}/'
|
||||
);
|
||||
|
||||
public function inflectPackageVars($vars)
|
||||
{
|
||||
return $this->parseVars($vars);
|
||||
}
|
||||
|
||||
protected function parseVars($vars)
|
||||
{
|
||||
$vars['vendor'] = strtolower($vars['vendor']) == 'sitedirect' ? 'SiteDirect' : $vars['vendor'];
|
||||
$vars['name'] = str_replace(array('-', '_'), ' ', $vars['name']);
|
||||
$vars['name'] = str_replace(' ', '', ucwords($vars['name']));
|
||||
|
||||
return $vars;
|
||||
}
|
||||
}
|
||||
49
vendor/composer/installers/src/Composer/Installers/SyDESInstaller.php
vendored
Normal file
49
vendor/composer/installers/src/Composer/Installers/SyDESInstaller.php
vendored
Normal file
@@ -0,0 +1,49 @@
|
||||
<?php
|
||||
namespace Composer\Installers;
|
||||
|
||||
class SyDESInstaller extends BaseInstaller
|
||||
{
|
||||
protected $locations = array(
|
||||
'module' => 'app/modules/{$name}/',
|
||||
'theme' => 'themes/{$name}/',
|
||||
);
|
||||
|
||||
/**
|
||||
* Format module name.
|
||||
*
|
||||
* Strip `sydes-` prefix and a trailing '-theme' or '-module' from package name if present.
|
||||
*
|
||||
* @param array @vars
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function inflectPackageVars($vars)
|
||||
{
|
||||
if ($vars['type'] == 'sydes-module') {
|
||||
return $this->inflectModuleVars($vars);
|
||||
}
|
||||
|
||||
if ($vars['type'] === 'sydes-theme') {
|
||||
return $this->inflectThemeVars($vars);
|
||||
}
|
||||
|
||||
return $vars;
|
||||
}
|
||||
|
||||
public function inflectModuleVars($vars)
|
||||
{
|
||||
$vars['name'] = preg_replace('/(^sydes-|-module$)/i', '', $vars['name']);
|
||||
$vars['name'] = str_replace(array('-', '_'), ' ', $vars['name']);
|
||||
$vars['name'] = str_replace(' ', '', ucwords($vars['name']));
|
||||
|
||||
return $vars;
|
||||
}
|
||||
|
||||
protected function inflectThemeVars($vars)
|
||||
{
|
||||
$vars['name'] = preg_replace('/(^sydes-|-theme$)/', '', $vars['name']);
|
||||
$vars['name'] = strtolower($vars['name']);
|
||||
|
||||
return $vars;
|
||||
}
|
||||
}
|
||||
26
vendor/composer/installers/src/Composer/Installers/Symfony1Installer.php
vendored
Normal file
26
vendor/composer/installers/src/Composer/Installers/Symfony1Installer.php
vendored
Normal file
@@ -0,0 +1,26 @@
|
||||
<?php
|
||||
namespace Composer\Installers;
|
||||
|
||||
/**
|
||||
* Plugin installer for symfony 1.x
|
||||
*
|
||||
* @author Jérôme Tamarelle <jerome@tamarelle.net>
|
||||
*/
|
||||
class Symfony1Installer extends BaseInstaller
|
||||
{
|
||||
protected $locations = array(
|
||||
'plugin' => 'plugins/{$name}/',
|
||||
);
|
||||
|
||||
/**
|
||||
* Format package name to CamelCase
|
||||
*/
|
||||
public function inflectPackageVars($vars)
|
||||
{
|
||||
$vars['name'] = preg_replace_callback('/(-[a-z])/', function ($matches) {
|
||||
return strtoupper($matches[0][1]);
|
||||
}, $vars['name']);
|
||||
|
||||
return $vars;
|
||||
}
|
||||
}
|
||||
16
vendor/composer/installers/src/Composer/Installers/TYPO3CmsInstaller.php
vendored
Normal file
16
vendor/composer/installers/src/Composer/Installers/TYPO3CmsInstaller.php
vendored
Normal file
@@ -0,0 +1,16 @@
|
||||
<?php
|
||||
namespace Composer\Installers;
|
||||
|
||||
/**
|
||||
* Extension installer for TYPO3 CMS
|
||||
*
|
||||
* @deprecated since 1.0.25, use https://packagist.org/packages/typo3/cms-composer-installers instead
|
||||
*
|
||||
* @author Sascha Egerer <sascha.egerer@dkd.de>
|
||||
*/
|
||||
class TYPO3CmsInstaller extends BaseInstaller
|
||||
{
|
||||
protected $locations = array(
|
||||
'extension' => 'typo3conf/ext/{$name}/',
|
||||
);
|
||||
}
|
||||
38
vendor/composer/installers/src/Composer/Installers/TYPO3FlowInstaller.php
vendored
Normal file
38
vendor/composer/installers/src/Composer/Installers/TYPO3FlowInstaller.php
vendored
Normal file
@@ -0,0 +1,38 @@
|
||||
<?php
|
||||
namespace Composer\Installers;
|
||||
|
||||
/**
|
||||
* An installer to handle TYPO3 Flow specifics when installing packages.
|
||||
*/
|
||||
class TYPO3FlowInstaller extends BaseInstaller
|
||||
{
|
||||
protected $locations = array(
|
||||
'package' => 'Packages/Application/{$name}/',
|
||||
'framework' => 'Packages/Framework/{$name}/',
|
||||
'plugin' => 'Packages/Plugins/{$name}/',
|
||||
'site' => 'Packages/Sites/{$name}/',
|
||||
'boilerplate' => 'Packages/Boilerplates/{$name}/',
|
||||
'build' => 'Build/{$name}/',
|
||||
);
|
||||
|
||||
/**
|
||||
* Modify the package name to be a TYPO3 Flow style key.
|
||||
*
|
||||
* @param array $vars
|
||||
* @return array
|
||||
*/
|
||||
public function inflectPackageVars($vars)
|
||||
{
|
||||
$autoload = $this->package->getAutoload();
|
||||
if (isset($autoload['psr-0']) && is_array($autoload['psr-0'])) {
|
||||
$namespace = key($autoload['psr-0']);
|
||||
$vars['name'] = str_replace('\\', '.', $namespace);
|
||||
}
|
||||
if (isset($autoload['psr-4']) && is_array($autoload['psr-4'])) {
|
||||
$namespace = key($autoload['psr-4']);
|
||||
$vars['name'] = rtrim(str_replace('\\', '.', $namespace), '.');
|
||||
}
|
||||
|
||||
return $vars;
|
||||
}
|
||||
}
|
||||
12
vendor/composer/installers/src/Composer/Installers/TheliaInstaller.php
vendored
Normal file
12
vendor/composer/installers/src/Composer/Installers/TheliaInstaller.php
vendored
Normal file
@@ -0,0 +1,12 @@
|
||||
<?php
|
||||
namespace Composer\Installers;
|
||||
|
||||
class TheliaInstaller extends BaseInstaller
|
||||
{
|
||||
protected $locations = array(
|
||||
'module' => 'local/modules/{$name}/',
|
||||
'frontoffice-template' => 'templates/frontOffice/{$name}/',
|
||||
'backoffice-template' => 'templates/backOffice/{$name}/',
|
||||
'email-template' => 'templates/email/{$name}/',
|
||||
);
|
||||
}
|
||||
14
vendor/composer/installers/src/Composer/Installers/TuskInstaller.php
vendored
Normal file
14
vendor/composer/installers/src/Composer/Installers/TuskInstaller.php
vendored
Normal file
@@ -0,0 +1,14 @@
|
||||
<?php
|
||||
namespace Composer\Installers;
|
||||
/**
|
||||
* Composer installer for 3rd party Tusk utilities
|
||||
* @author Drew Ewing <drew@phenocode.com>
|
||||
*/
|
||||
class TuskInstaller extends BaseInstaller
|
||||
{
|
||||
protected $locations = array(
|
||||
'task' => '.tusk/tasks/{$name}/',
|
||||
'command' => '.tusk/commands/{$name}/',
|
||||
'asset' => 'assets/tusk/{$name}/',
|
||||
);
|
||||
}
|
||||
9
vendor/composer/installers/src/Composer/Installers/UserFrostingInstaller.php
vendored
Normal file
9
vendor/composer/installers/src/Composer/Installers/UserFrostingInstaller.php
vendored
Normal file
@@ -0,0 +1,9 @@
|
||||
<?php
|
||||
namespace Composer\Installers;
|
||||
|
||||
class UserFrostingInstaller extends BaseInstaller
|
||||
{
|
||||
protected $locations = array(
|
||||
'sprinkle' => 'app/sprinkles/{$name}/',
|
||||
);
|
||||
}
|
||||
10
vendor/composer/installers/src/Composer/Installers/VanillaInstaller.php
vendored
Normal file
10
vendor/composer/installers/src/Composer/Installers/VanillaInstaller.php
vendored
Normal file
@@ -0,0 +1,10 @@
|
||||
<?php
|
||||
namespace Composer\Installers;
|
||||
|
||||
class VanillaInstaller extends BaseInstaller
|
||||
{
|
||||
protected $locations = array(
|
||||
'plugin' => 'plugins/{$name}/',
|
||||
'theme' => 'themes/{$name}/',
|
||||
);
|
||||
}
|
||||
49
vendor/composer/installers/src/Composer/Installers/VgmcpInstaller.php
vendored
Normal file
49
vendor/composer/installers/src/Composer/Installers/VgmcpInstaller.php
vendored
Normal file
@@ -0,0 +1,49 @@
|
||||
<?php
|
||||
namespace Composer\Installers;
|
||||
|
||||
class VgmcpInstaller extends BaseInstaller
|
||||
{
|
||||
protected $locations = array(
|
||||
'bundle' => 'src/{$vendor}/{$name}/',
|
||||
'theme' => 'themes/{$name}/'
|
||||
);
|
||||
|
||||
/**
|
||||
* Format package name.
|
||||
*
|
||||
* For package type vgmcp-bundle, cut off a trailing '-bundle' if present.
|
||||
*
|
||||
* For package type vgmcp-theme, cut off a trailing '-theme' if present.
|
||||
*
|
||||
*/
|
||||
public function inflectPackageVars($vars)
|
||||
{
|
||||
if ($vars['type'] === 'vgmcp-bundle') {
|
||||
return $this->inflectPluginVars($vars);
|
||||
}
|
||||
|
||||
if ($vars['type'] === 'vgmcp-theme') {
|
||||
return $this->inflectThemeVars($vars);
|
||||
}
|
||||
|
||||
return $vars;
|
||||
}
|
||||
|
||||
protected function inflectPluginVars($vars)
|
||||
{
|
||||
$vars['name'] = preg_replace('/-bundle$/', '', $vars['name']);
|
||||
$vars['name'] = str_replace(array('-', '_'), ' ', $vars['name']);
|
||||
$vars['name'] = str_replace(' ', '', ucwords($vars['name']));
|
||||
|
||||
return $vars;
|
||||
}
|
||||
|
||||
protected function inflectThemeVars($vars)
|
||||
{
|
||||
$vars['name'] = preg_replace('/-theme$/', '', $vars['name']);
|
||||
$vars['name'] = str_replace(array('-', '_'), ' ', $vars['name']);
|
||||
$vars['name'] = str_replace(' ', '', ucwords($vars['name']));
|
||||
|
||||
return $vars;
|
||||
}
|
||||
}
|
||||
10
vendor/composer/installers/src/Composer/Installers/WHMCSInstaller.php
vendored
Normal file
10
vendor/composer/installers/src/Composer/Installers/WHMCSInstaller.php
vendored
Normal file
@@ -0,0 +1,10 @@
|
||||
<?php
|
||||
|
||||
namespace Composer\Installers;
|
||||
|
||||
class WHMCSInstaller extends BaseInstaller
|
||||
{
|
||||
protected $locations = array(
|
||||
'gateway' => 'modules/gateways/{$name}/',
|
||||
);
|
||||
}
|
||||
9
vendor/composer/installers/src/Composer/Installers/WolfCMSInstaller.php
vendored
Normal file
9
vendor/composer/installers/src/Composer/Installers/WolfCMSInstaller.php
vendored
Normal file
@@ -0,0 +1,9 @@
|
||||
<?php
|
||||
namespace Composer\Installers;
|
||||
|
||||
class WolfCMSInstaller extends BaseInstaller
|
||||
{
|
||||
protected $locations = array(
|
||||
'plugin' => 'wolf/plugins/{$name}/',
|
||||
);
|
||||
}
|
||||
12
vendor/composer/installers/src/Composer/Installers/WordPressInstaller.php
vendored
Normal file
12
vendor/composer/installers/src/Composer/Installers/WordPressInstaller.php
vendored
Normal file
@@ -0,0 +1,12 @@
|
||||
<?php
|
||||
namespace Composer\Installers;
|
||||
|
||||
class WordPressInstaller extends BaseInstaller
|
||||
{
|
||||
protected $locations = array(
|
||||
'plugin' => 'wp-content/plugins/{$name}/',
|
||||
'theme' => 'wp-content/themes/{$name}/',
|
||||
'muplugin' => 'wp-content/mu-plugins/{$name}/',
|
||||
'dropin' => 'wp-content/{$name}/',
|
||||
);
|
||||
}
|
||||
32
vendor/composer/installers/src/Composer/Installers/YawikInstaller.php
vendored
Normal file
32
vendor/composer/installers/src/Composer/Installers/YawikInstaller.php
vendored
Normal file
@@ -0,0 +1,32 @@
|
||||
<?php
|
||||
/**
|
||||
* Created by PhpStorm.
|
||||
* User: cbleek
|
||||
* Date: 25.03.16
|
||||
* Time: 20:55
|
||||
*/
|
||||
|
||||
namespace Composer\Installers;
|
||||
|
||||
|
||||
class YawikInstaller extends BaseInstaller
|
||||
{
|
||||
protected $locations = array(
|
||||
'module' => 'module/{$name}/',
|
||||
);
|
||||
|
||||
/**
|
||||
* Format package name to CamelCase
|
||||
* @param array $vars
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function inflectPackageVars($vars)
|
||||
{
|
||||
$vars['name'] = strtolower(preg_replace('/(?<=\\w)([A-Z])/', '_\\1', $vars['name']));
|
||||
$vars['name'] = str_replace(array('-', '_'), ' ', $vars['name']);
|
||||
$vars['name'] = str_replace(' ', '', ucwords($vars['name']));
|
||||
|
||||
return $vars;
|
||||
}
|
||||
}
|
||||
11
vendor/composer/installers/src/Composer/Installers/ZendInstaller.php
vendored
Normal file
11
vendor/composer/installers/src/Composer/Installers/ZendInstaller.php
vendored
Normal file
@@ -0,0 +1,11 @@
|
||||
<?php
|
||||
namespace Composer\Installers;
|
||||
|
||||
class ZendInstaller extends BaseInstaller
|
||||
{
|
||||
protected $locations = array(
|
||||
'library' => 'library/{$name}/',
|
||||
'extra' => 'extras/library/{$name}/',
|
||||
'module' => 'module/{$name}/',
|
||||
);
|
||||
}
|
||||
10
vendor/composer/installers/src/Composer/Installers/ZikulaInstaller.php
vendored
Normal file
10
vendor/composer/installers/src/Composer/Installers/ZikulaInstaller.php
vendored
Normal file
@@ -0,0 +1,10 @@
|
||||
<?php
|
||||
namespace Composer\Installers;
|
||||
|
||||
class ZikulaInstaller extends BaseInstaller
|
||||
{
|
||||
protected $locations = array(
|
||||
'module' => 'modules/{$vendor}-{$name}/',
|
||||
'theme' => 'themes/{$vendor}-{$name}/'
|
||||
);
|
||||
}
|
||||
13
vendor/composer/installers/src/bootstrap.php
vendored
Normal file
13
vendor/composer/installers/src/bootstrap.php
vendored
Normal file
@@ -0,0 +1,13 @@
|
||||
<?php
|
||||
function includeIfExists($file)
|
||||
{
|
||||
if (file_exists($file)) {
|
||||
return include $file;
|
||||
}
|
||||
}
|
||||
if ((!$loader = includeIfExists(__DIR__ . '/../vendor/autoload.php')) && (!$loader = includeIfExists(__DIR__ . '/../../../autoload.php'))) {
|
||||
die('You must set up the project dependencies, run the following commands:'.PHP_EOL.
|
||||
'curl -s http://getcomposer.org/installer | php'.PHP_EOL.
|
||||
'php composer.phar install'.PHP_EOL);
|
||||
}
|
||||
return $loader;
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user