mirror of
https://git.friendi.ca/friendica/friendica-addons.git
synced 2025-10-16 11:41:57 +00:00
[twitter] Update abraham/twitteroauth dependency
This commit is contained in:
parent
30445b3c85
commit
569e3f4831
167 changed files with 11848 additions and 2157 deletions
49
twitter/vendor/composer/installers/src/Composer/Installers/AsgardInstaller.php
vendored
Normal file
49
twitter/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;
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue