Simple Calendar – Google Calendar Plugin - Version 3.0.9

Version Description

  • December 16, 2015 =

  • Fix: Fixed all-day events with an end time showing on an extra day.

  • Fix: Fixed a bug with site default timezone setting not pulling in correctly.

  • Tweak: Make always enqueue option enabled by default for new installs.

  • Tweak: Translations moved from .po/.mo files to official wordpress.org translation packs.

  • Tweak: Minor text fixes to admin UI.

Download this release

Release Info

Developer pderksen
Plugin Icon 128x128 Simple Calendar – Google Calendar Plugin
Version 3.0.9
Comparing to
See all releases

Code changes from version 3.0.8 to 3.0.9

Files changed (109) hide show
  1. assets/css/admin-activation.min.css +1 -1
  2. assets/css/admin-add-calendar.min.css +1 -1
  3. assets/css/admin.min.css +1 -1
  4. assets/css/default-calendar-grid.min.css +1 -1
  5. assets/css/default-calendar-list.min.css +1 -1
  6. assets/js/admin-add-calendar.min.js +1 -1
  7. assets/js/admin.min.js +1 -1
  8. assets/js/default-calendar.min.js +1 -1
  9. contributing.md +58 -0
  10. google-calendar-events.php +3 -3
  11. i18n/translating.txt +11 -0
  12. includes/admin/fields/checkbox.php +1 -1
  13. includes/admin/metaboxes/settings.php +1 -1
  14. includes/admin/pages.php +17 -0
  15. includes/admin/pages/advanced.php +1 -1
  16. includes/calendars/default-calendar.php +2 -2
  17. includes/calendars/views/default-calendar-grid.php +1 -1
  18. includes/events/event-builder.php +3 -15
  19. includes/feeds/admin/google-admin.php +1 -1
  20. includes/feeds/google.php +2 -2
  21. includes/functions/shared.php +1 -1
  22. languages/google-calendar-events.pot +0 -1418
  23. languages/index.php +0 -8
  24. languages/readme.md +0 -13
  25. languages/readme.txt +0 -11
  26. readme.txt +13 -3
  27. vendor/autoload_52.php +1 -1
  28. vendor/composer/ClassLoader.php +3 -3
  29. vendor/composer/autoload_classmap.php +60 -0
  30. vendor/composer/autoload_namespaces.php +1 -0
  31. vendor/composer/autoload_real_52.php +3 -3
  32. vendor/composer/installed.json +100 -0
  33. vendor/composer/installers/LICENSE +19 -0
  34. vendor/composer/installers/README.md +193 -0
  35. vendor/composer/installers/composer.json +80 -0
  36. vendor/composer/installers/phpunit.xml.dist +25 -0
  37. vendor/composer/installers/src/Composer/Installers/AglInstaller.php +21 -0
  38. vendor/composer/installers/src/Composer/Installers/AimeosInstaller.php +9 -0
  39. vendor/composer/installers/src/Composer/Installers/AnnotateCmsInstaller.php +11 -0
  40. vendor/composer/installers/src/Composer/Installers/AsgardInstaller.php +45 -0
  41. vendor/composer/installers/src/Composer/Installers/BaseInstaller.php +135 -0
  42. vendor/composer/installers/src/Composer/Installers/BitrixInstaller.php +89 -0
  43. vendor/composer/installers/src/Composer/Installers/BonefishInstaller.php +9 -0
  44. vendor/composer/installers/src/Composer/Installers/CakePHPInstaller.php +84 -0
  45. vendor/composer/installers/src/Composer/Installers/ChefInstaller.php +11 -0
  46. vendor/composer/installers/src/Composer/Installers/ClanCatsFrameworkInstaller.php +10 -0
  47. vendor/composer/installers/src/Composer/Installers/CodeIgniterInstaller.php +11 -0
  48. vendor/composer/installers/src/Composer/Installers/Concrete5Installer.php +12 -0
  49. vendor/composer/installers/src/Composer/Installers/CraftInstaller.php +35 -0
  50. vendor/composer/installers/src/Composer/Installers/CroogoInstaller.php +21 -0
  51. vendor/composer/installers/src/Composer/Installers/DokuWikiInstaller.php +50 -0
  52. vendor/composer/installers/src/Composer/Installers/DolibarrInstaller.php +16 -0
  53. vendor/composer/installers/src/Composer/Installers/DrupalInstaller.php +14 -0
  54. vendor/composer/installers/src/Composer/Installers/ElggInstaller.php +9 -0
  55. vendor/composer/installers/src/Composer/Installers/FuelInstaller.php +11 -0
  56. vendor/composer/installers/src/Composer/Installers/FuelphpInstaller.php +9 -0
  57. vendor/composer/installers/src/Composer/Installers/GravInstaller.php +30 -0
  58. vendor/composer/installers/src/Composer/Installers/HuradInstaller.php +25 -0
  59. vendor/composer/installers/src/Composer/Installers/Installer.php +176 -0
  60. vendor/composer/installers/src/Composer/Installers/JoomlaInstaller.php +15 -0
  61. vendor/composer/installers/src/Composer/Installers/KirbyInstaller.php +9 -0
  62. vendor/composer/installers/src/Composer/Installers/KodiCMSInstaller.php +10 -0
  63. vendor/composer/installers/src/Composer/Installers/KohanaInstaller.php +9 -0
  64. vendor/composer/installers/src/Composer/Installers/LaravelInstaller.php +9 -0
  65. vendor/composer/installers/src/Composer/Installers/LithiumInstaller.php +10 -0
  66. vendor/composer/installers/src/Composer/Installers/MODULEWorkInstaller.php +9 -0
  67. vendor/composer/installers/src/Composer/Installers/MODXEvoInstaller.php +16 -0
  68. vendor/composer/installers/src/Composer/Installers/MagentoInstaller.php +11 -0
  69. vendor/composer/installers/src/Composer/Installers/MakoInstaller.php +9 -0
  70. vendor/composer/installers/src/Composer/Installers/MediaWikiInstaller.php +50 -0
  71. vendor/composer/installers/src/Composer/Installers/MicroweberInstaller.php +111 -0
  72. vendor/composer/installers/src/Composer/Installers/MoodleInstaller.php +56 -0
  73. vendor/composer/installers/src/Composer/Installers/OctoberInstaller.php +46 -0
  74. vendor/composer/installers/src/Composer/Installers/OxidInstaller.php +11 -0
  75. vendor/composer/installers/src/Composer/Installers/PPIInstaller.php +9 -0
  76. vendor/composer/installers/src/Composer/Installers/PhpBBInstaller.php +11 -0
  77. vendor/composer/installers/src/Composer/Installers/PimcoreInstaller.php +21 -0
  78. vendor/composer/installers/src/Composer/Installers/PiwikInstaller.php +32 -0
  79. vendor/composer/installers/src/Composer/Installers/Plugin.php +17 -0
  80. vendor/composer/installers/src/Composer/Installers/PrestashopInstaller.php +10 -0
  81. vendor/composer/installers/src/Composer/Installers/PuppetInstaller.php +11 -0
  82. vendor/composer/installers/src/Composer/Installers/RedaxoInstaller.php +10 -0
  83. vendor/composer/installers/src/Composer/Installers/RoundcubeInstaller.php +22 -0
  84. vendor/composer/installers/src/Composer/Installers/SMFInstaller.php +10 -0
  85. vendor/composer/installers/src/Composer/Installers/ShopwareInstaller.php +58 -0
  86. vendor/composer/installers/src/Composer/Installers/SilverStripeInstaller.php +36 -0
  87. vendor/composer/installers/src/Composer/Installers/Symfony1Installer.php +26 -0
  88. vendor/composer/installers/src/Composer/Installers/TYPO3CmsInstaller.php +14 -0
  89. vendor/composer/installers/src/Composer/Installers/TYPO3FlowInstaller.php +38 -0
  90. vendor/composer/installers/src/Composer/Installers/TheliaInstaller.php +12 -0
  91. vendor/composer/installers/src/Composer/Installers/TuskInstaller.php +14 -0
  92. vendor/composer/installers/src/Composer/Installers/WHMCSInstaller.php +10 -0
  93. vendor/composer/installers/src/Composer/Installers/WolfCMSInstaller.php +9 -0
  94. vendor/composer/installers/src/Composer/Installers/WordPressInstaller.php +11 -0
  95. vendor/composer/installers/src/Composer/Installers/ZendInstaller.php +11 -0
  96. vendor/composer/installers/src/Composer/Installers/ZikulaInstaller.php +10 -0
  97. vendor/composer/installers/src/bootstrap.php +13 -0
  98. vendor/composer/installers/tests/Composer/Installers/Test/AsgardInstallerTest.php +61 -0
  99. vendor/composer/installers/tests/Composer/Installers/Test/CakePHPInstallerTest.php +115 -0
  100. vendor/composer/installers/tests/Composer/Installers/Test/CraftInstallerTest.php +83 -0
  101. vendor/composer/installers/tests/Composer/Installers/Test/DokuWikiInstallerTest.php +89 -0
  102. vendor/composer/installers/tests/Composer/Installers/Test/GravInstallerTest.php +63 -0
  103. vendor/composer/installers/tests/Composer/Installers/Test/InstallerTest.php +428 -0
  104. vendor/composer/installers/tests/Composer/Installers/Test/MediaWikiInstallerTest.php +66 -0
  105. vendor/composer/installers/tests/Composer/Installers/Test/OctoberInstallerTest.php +66 -0
  106. vendor/composer/installers/tests/Composer/Installers/Test/PimcoreInstallerTest.php +44 -0
  107. vendor/composer/installers/tests/Composer/Installers/Test/PiwikInstallerTest.php +63 -0
  108. vendor/composer/installers/tests/Composer/Installers/Test/TestCase.php +64 -0
  109. vendor/composer/installers/tests/bootstrap.php +4 -0
assets/css/admin-activation.min.css CHANGED
@@ -1,4 +1,4 @@
1
- /*! Simple Calendar - 3.0.8
2
  * https://simplecalendar.io
3
  * Copyright (c) Moonstone Media 2015
4
  * Licensed GPLv2+ */
1
+ /*! Simple Calendar - 3.0.9
2
  * https://simplecalendar.io
3
  * Copyright (c) Moonstone Media 2015
4
  * Licensed GPLv2+ */
assets/css/admin-add-calendar.min.css CHANGED
@@ -1,4 +1,4 @@
1
- /*! Simple Calendar - 3.0.8
2
  * https://simplecalendar.io
3
  * Copyright (c) Moonstone Media 2015
4
  * Licensed GPLv2+ */
1
+ /*! Simple Calendar - 3.0.9
2
  * https://simplecalendar.io
3
  * Copyright (c) Moonstone Media 2015
4
  * Licensed GPLv2+ */
assets/css/admin.min.css CHANGED
@@ -1,4 +1,4 @@
1
- /*! Simple Calendar - 3.0.8
2
  * https://simplecalendar.io
3
  * Copyright (c) Moonstone Media 2015
4
  * Licensed GPLv2+ */
1
+ /*! Simple Calendar - 3.0.9
2
  * https://simplecalendar.io
3
  * Copyright (c) Moonstone Media 2015
4
  * Licensed GPLv2+ */
assets/css/default-calendar-grid.min.css CHANGED
@@ -1,4 +1,4 @@
1
- /*! Simple Calendar - 3.0.8
2
  * https://simplecalendar.io
3
  * Copyright (c) Moonstone Media 2015
4
  * Licensed GPLv2+ */
1
+ /*! Simple Calendar - 3.0.9
2
  * https://simplecalendar.io
3
  * Copyright (c) Moonstone Media 2015
4
  * Licensed GPLv2+ */
assets/css/default-calendar-list.min.css CHANGED
@@ -1,4 +1,4 @@
1
- /*! Simple Calendar - 3.0.8
2
  * https://simplecalendar.io
3
  * Copyright (c) Moonstone Media 2015
4
  * Licensed GPLv2+ */
1
+ /*! Simple Calendar - 3.0.9
2
  * https://simplecalendar.io
3
  * Copyright (c) Moonstone Media 2015
4
  * Licensed GPLv2+ */
assets/js/admin-add-calendar.min.js CHANGED
@@ -1,4 +1,4 @@
1
- /*! Simple Calendar - 3.0.8
2
  * https://simplecalendar.io
3
  * Copyright (c) Moonstone Media 2015
4
  * Licensed GPLv2+ */
1
+ /*! Simple Calendar - 3.0.9
2
  * https://simplecalendar.io
3
  * Copyright (c) Moonstone Media 2015
4
  * Licensed GPLv2+ */
assets/js/admin.min.js CHANGED
@@ -1,4 +1,4 @@
1
- /*! Simple Calendar - 3.0.8
2
  * https://simplecalendar.io
3
  * Copyright (c) Moonstone Media 2015
4
  * Licensed GPLv2+ */
1
+ /*! Simple Calendar - 3.0.9
2
  * https://simplecalendar.io
3
  * Copyright (c) Moonstone Media 2015
4
  * Licensed GPLv2+ */
assets/js/default-calendar.min.js CHANGED
@@ -1,4 +1,4 @@
1
- /*! Simple Calendar - 3.0.8
2
  * https://simplecalendar.io
3
  * Copyright (c) Moonstone Media 2015
4
  * Licensed GPLv2+ */
1
+ /*! Simple Calendar - 3.0.9
2
  * https://simplecalendar.io
3
  * Copyright (c) Moonstone Media 2015
4
  * Licensed GPLv2+ */
contributing.md ADDED
@@ -0,0 +1,58 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ## Contributing
2
+
3
+ Simple Calendar is open source software. Community made patches, localizations, bug reports and contributions are always welcome and crucial to make this plugin a quality tool that empowers people, businesses and institutions alike.
4
+
5
+ You can contribute to Simple Calendar by contributing translations, reporting issues, or submitting pull requests.
6
+
7
+ Support questions or feature requests should be posted to the [WordPress.org support forums](https://wordpress.org/support/plugin/google-calendar-events) instead.
8
+
9
+ ### Contributing Translations
10
+
11
+ Interested in translating Simple Calendar to your language? Please use our [WordPress.org translation page](https://translate.wordpress.org/projects/wp-plugins/google-calendar-events) using a free account.
12
+
13
+ New to Translating WordPress? Read through the [Translator Handbook](https://make.wordpress.org/polyglots/handbook/tools/glotpress-translate-wordpress-org/) to get started.
14
+
15
+ It is no longer necessary to generate and translate .po and .mo files manually. If you want to become a translation editor for your language please get in touch.
16
+
17
+ ### Reporting Issues
18
+
19
+ If something isn't working, you can help us fix it by submitting an issue report following these steps.
20
+
21
+ 1. Isolate your issue, check for theme or plugin compatibility issues first.
22
+ 2. Make sure you have a [GitHub account](https://github.com/signup/free).
23
+ 3. Search the [Existing Issues](https://github.com/moonstonemedia/Simple-Calendar/issues) to be sure that the one you've noticed isn't already there.
24
+ 4. Submit a report for your issue:
25
+ * Clearly describe the issue.
26
+ * Include steps to reproduce the issue if it's a bug.
27
+ * If it's a compatibility issue, please add further details.
28
+
29
+ ### Submitting Pull Requests
30
+
31
+ If you are knowledgeable of PHP, JavaScript, HTML and/or CSS, and you notice something that can be improved for the benefit of all users of this software, you can propose your changes and issue a pull request (PR) here on GitHub.
32
+
33
+ First, fork this repository on GiHub or clone to your machine:
34
+
35
+ $ git clone https://github.com/moonstonemedia/Simple-Calendar
36
+
37
+ This project uses [Composer](https://getcomposer.org/) to grab dependencies not stored in source control. To setup composer run:
38
+
39
+ $ composer install
40
+ $ composer dump-autoload -o
41
+
42
+ If you plan to work with CSS or JavaScript you may want to use Grunt as well:
43
+
44
+ $ npm install
45
+
46
+ First make your changes locally, then push them to your forked repository.
47
+
48
+ Next, issue a pull request in the original repository with your remote branch (use the master branch as target, do not bother with other branches).
49
+
50
+ Please review the [GitHub recommended guidelines for using pull requests](https://help.github.com/articles/using-pull-requests/).
51
+
52
+ There are a few things to keep in mind when making changes and developing locally for this project.
53
+
54
+ * The most important one is to **ensure you stick to the [WordPress Coding Standards](http://make.wordpress.org/core/handbook/coding-standards/php/)**.
55
+ * When commiting reference your issue number (e.g. #1234) and include a note about the fix/changes you are proposing.
56
+ * Please **don't** modify the changelogs or readme.txt or other meta assets.
57
+
58
+ Finally, a big thanks from us and the plugin community for your help.
google-calendar-events.php CHANGED
@@ -3,7 +3,7 @@
3
  * Plugin Name: Simple Calendar
4
  * Plugin URI: https://simplecalendar.io
5
  * Description: Add Google Calendar events to your WordPress site in minutes. Beautiful calendar displays. Fully responsive.
6
- * Version: 3.0.8
7
  * Author: Moonstone Media
8
  * Author URI: https://simplecalendar.io
9
  * Text Domain: google-calendar-events
@@ -29,7 +29,7 @@ if ( version_compare( PHP_VERSION, '5.3.0' ) === -1 ) {
29
  $this_plugin_path = trailingslashit( dirname( __FILE__ ) );
30
  $this_plugin_dir = plugin_dir_url( __FILE__ );
31
  $this_plugin_constants = array(
32
- 'SIMPLE_CALENDAR_VERSION' => '3.0.8',
33
  'SIMPLE_CALENDAR_MAIN_FILE' => __FILE__,
34
  'SIMPLE_CALENDAR_URL' => $this_plugin_dir,
35
  'SIMPLE_CALENDAR_ASSETS' => $this_plugin_dir . 'assets/',
@@ -47,7 +47,7 @@ $this_plugin_checks = new WP_Requirements(
47
  'Simple Calendar',
48
  plugin_basename( __FILE__ ),
49
  array(
50
- 'PHP' => '5.3.0',
51
  'WordPress' => '4.0.0',
52
  'Extensions' => array(
53
  'curl',
3
  * Plugin Name: Simple Calendar
4
  * Plugin URI: https://simplecalendar.io
5
  * Description: Add Google Calendar events to your WordPress site in minutes. Beautiful calendar displays. Fully responsive.
6
+ * Version: 3.0.9
7
  * Author: Moonstone Media
8
  * Author URI: https://simplecalendar.io
9
  * Text Domain: google-calendar-events
29
  $this_plugin_path = trailingslashit( dirname( __FILE__ ) );
30
  $this_plugin_dir = plugin_dir_url( __FILE__ );
31
  $this_plugin_constants = array(
32
+ 'SIMPLE_CALENDAR_VERSION' => '3.0.9',
33
  'SIMPLE_CALENDAR_MAIN_FILE' => __FILE__,
34
  'SIMPLE_CALENDAR_URL' => $this_plugin_dir,
35
  'SIMPLE_CALENDAR_ASSETS' => $this_plugin_dir . 'assets/',
47
  'Simple Calendar',
48
  plugin_basename( __FILE__ ),
49
  array(
50
+ 'PHP' => '5.3.3',
51
  'WordPress' => '4.0.0',
52
  'Extensions' => array(
53
  'curl',
i18n/translating.txt ADDED
@@ -0,0 +1,11 @@
 
 
 
 
 
 
 
 
 
 
 
1
+ Interested in translating Simple Calendar to your language? Please use our WordPress.org translation page using a free account.
2
+
3
+ https://translate.wordpress.org/projects/wp-plugins/google-calendar-events
4
+
5
+ New to translating WordPress? Read through the Translator Handbook to get started.
6
+
7
+ https://make.wordpress.org/polyglots/handbook/tools/glotpress-translate-wordpress-org/
8
+
9
+ It is no longer necessary to generate and translate .po and .mo files manually. If you want to become a translation editor for your language please get in touch.
10
+
11
+ Thank you!
includes/admin/fields/checkbox.php CHANGED
@@ -64,7 +64,7 @@ class Checkbox extends Field {
64
  class="simcal-field simcal-field-checkbox"
65
  type="checkbox"
66
  value="<?php echo trim( strval( $option ) ); ?>"
67
- <?php checked( $this->value, $option, true ); ?>
68
  <?php echo $this->attributes; ?>
69
  /><?php echo esc_attr( $name ); ?>
70
  </label>
64
  class="simcal-field simcal-field-checkbox"
65
  type="checkbox"
66
  value="<?php echo trim( strval( $option ) ); ?>"
67
+ <?php checked( $this->value, 'yes', true ); ?>
68
  <?php echo $this->attributes; ?>
69
  /><?php echo esc_attr( $name ); ?>
70
  </label>
includes/admin/metaboxes/settings.php CHANGED
@@ -458,7 +458,7 @@ class Settings implements Meta_Box {
458
  'type' => 'checkbox',
459
  'name' => '_calendar_is_static',
460
  'id' => '_calendar_is_static',
461
- 'tooltip' => __( "Remove the navigation arrows and fix the calendar view to it's initial state.", 'google-calendar-events' ),
462
  'value' => 'yes' == $fixed ? 'yes' : 'no',
463
  ) );
464
 
458
  'type' => 'checkbox',
459
  'name' => '_calendar_is_static',
460
  'id' => '_calendar_is_static',
461
+ 'tooltip' => __( 'Remove the navigation arrows and fix the calendar view to its initial state.', 'google-calendar-events' ),
462
  'value' => 'yes' == $fixed ? 'yes' : 'no',
463
  ) );
464
 
includes/admin/pages.php CHANGED
@@ -260,6 +260,23 @@ class Pages {
260
  }
261
  }
262
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
263
  ?>
264
  </form>
265
  </div>
260
  }
261
  }
262
 
263
+ // Add option to show we ran through default settings
264
+ // We also run a check here for the main settings page option. This is to determine if this is a fresh install or if they already had
265
+ // the plugin installed. The main feed settings page would give the best idea of that since user's have to enter an API key on this page to get it working.
266
+ if ( false === get_option( 'simple-calendar_defaults' ) && false === get_option( 'simple-calendar_settings_feeds' ) ) {
267
+
268
+ $default_advanced = array (
269
+ 'assets' => array (
270
+ 'always_enqueue' => 'yes',
271
+ ),
272
+ );
273
+
274
+ update_option( 'simple-calendar_settings_advanced', $default_advanced );
275
+
276
+ add_option( 'simple-calendar_defaults', 1 );
277
+ }
278
+
279
+
280
  ?>
281
  </form>
282
  </div>
includes/admin/pages/advanced.php CHANGED
@@ -78,7 +78,7 @@ class Advanced extends Admin_Page {
78
  'type' => 'checkbox',
79
  'name' => 'simple-calendar_' . $this->option_group . '_' . $this->id . '[' . $section . '][always_enqueue]',
80
  'id' => 'simple-calendar-' . $this->option_group . '-' . $this->id . '-' . $section . '-always-enqueue',
81
- 'value' => $this->get_option_value( $section, 'always_enqueue' )
82
  ),
83
  'disable_css' => array(
84
  'title' => __( 'Disable Styles', 'google-calendar-events' ),
78
  'type' => 'checkbox',
79
  'name' => 'simple-calendar_' . $this->option_group . '_' . $this->id . '[' . $section . '][always_enqueue]',
80
  'id' => 'simple-calendar-' . $this->option_group . '-' . $this->id . '-' . $section . '-always-enqueue',
81
+ 'value' => $this->get_option_value( $section, 'always_enqueue' ),
82
  ),
83
  'disable_css' => array(
84
  'title' => __( 'Disable Styles', 'google-calendar-events' ),
includes/calendars/default-calendar.php CHANGED
@@ -222,9 +222,9 @@ class Default_Calendar extends Calendar {
222
  $new_events[ intval( $event->start + ( DAY_IN_SECONDS ) - 1 ) ][] = $event;
223
  } else {
224
 
225
- if ( ! empty( $event->whole_day ) ) {
226
  $days--;
227
- }
228
 
229
  for ( $d = 1; $d <= $days; $d++ ) {
230
  $new_events[ intval( $event->start + ( $d * DAY_IN_SECONDS ) - 1 ) ][] = $event;
222
  $new_events[ intval( $event->start + ( DAY_IN_SECONDS ) - 1 ) ][] = $event;
223
  } else {
224
 
225
+ /*if ( ! empty( $event->whole_day ) ) {
226
  $days--;
227
+ }*/
228
 
229
  for ( $d = 1; $d <= $days; $d++ ) {
230
  $new_events[ intval( $event->start + ( $d * DAY_IN_SECONDS ) - 1 ) ][] = $event;
includes/calendars/views/default-calendar-grid.php CHANGED
@@ -315,7 +315,7 @@ class Default_Calendar_Grid implements Calendar_View {
315
  $timestamps = array_keys( $events );
316
  $lower_bound = array_filter( $timestamps, array( $this, 'filter_events_before' ) );
317
  $higher_bound = array_filter( $lower_bound, array( $this, 'filter_events_after' ) );
318
- $filtered = array_intersect_key( $events, array_combine( $higher_bound, $higher_bound ) );
319
 
320
  // Put resulting events in an associative array, with day of the month as key for easy retrieval in calendar days loop.
321
  $day_events = array();
315
  $timestamps = array_keys( $events );
316
  $lower_bound = array_filter( $timestamps, array( $this, 'filter_events_before' ) );
317
  $higher_bound = array_filter( $lower_bound, array( $this, 'filter_events_after' ) );
318
+ $filtered = ( is_array( $events ) && is_array( $higher_bound) ) && ! empty( $events ) && ! empty( $higher_bound ) ? array_intersect_key( $events, array_combine( $higher_bound, $higher_bound ) ) : array();
319
 
320
  // Put resulting events in an associative array, with day of the month as key for easy retrieval in calendar days loop.
321
  $day_events = array();
includes/events/event-builder.php CHANGED
@@ -233,13 +233,8 @@ class Event_Builder {
233
  case 'length' :
234
  case 'duration' :
235
  if ( false !== $event->end ) {
236
- $duration = $event->start - $event->end - 1000;
237
-
238
- if ( $event->whole_day ) {
239
- $value = human_time_diff( $event->start, ( $event->end - 86500 ) );
240
- } else {
241
- $value = human_time_diff( $event->start, $event->end );
242
- }
243
  } else {
244
  $duration = '-1';
245
  $value = __( 'No end time', 'google-calendar-events' );
@@ -627,8 +622,6 @@ class Event_Builder {
627
 
628
  if ( $end instanceof Carbon ) {
629
 
630
- $end = ( $event->whole_day ? Carbon::createFromTimestamp( $end->getTimestamp() )->startOfDay()->subSeconds( 1 ) : $end );
631
-
632
  $output .= '-' .
633
  ' <span class="simcal-event-start simcal-event-end-date" ' .
634
  'data-event-start="' . $end->getTimestamp() . '" ' .
@@ -698,12 +691,7 @@ class Event_Builder {
698
  if ( 'human' == $format ) {
699
  $value = human_time_diff( $event_dt->getTimestamp(), Carbon::now( $event->timezone )->getTimestamp() );
700
  } else {
701
-
702
- if ( $event->whole_day ) {
703
- $value = date_i18n( $dt_format, $event_dt->getTimestamp() - 86400 );
704
- } else {
705
- $value = date_i18n( $dt_format, $event_dt->getTimestamp() );
706
- }
707
  }
708
 
709
  return '<span class="simcal-event-' . $bound . ' ' . 'simcal-event-' . $bound . '-' . $format . '"' .
233
  case 'length' :
234
  case 'duration' :
235
  if ( false !== $event->end ) {
236
+ $duration = $event->start - $event->end;
237
+ $value = human_time_diff( $event->start, $event->end );
 
 
 
 
 
238
  } else {
239
  $duration = '-1';
240
  $value = __( 'No end time', 'google-calendar-events' );
622
 
623
  if ( $end instanceof Carbon ) {
624
 
 
 
625
  $output .= '-' .
626
  ' <span class="simcal-event-start simcal-event-end-date" ' .
627
  'data-event-start="' . $end->getTimestamp() . '" ' .
691
  if ( 'human' == $format ) {
692
  $value = human_time_diff( $event_dt->getTimestamp(), Carbon::now( $event->timezone )->getTimestamp() );
693
  } else {
694
+ $value = date_i18n( $dt_format, $event_dt->getTimestamp() );
 
 
 
 
 
695
  }
696
 
697
  return '<span class="simcal-event-' . $bound . ' ' . 'simcal-event-' . $bound . '-' . $format . '"' .
includes/feeds/admin/google-admin.php CHANGED
@@ -84,7 +84,7 @@ class Google_Admin {
84
  'description' => __( "To read events from your public Google Calendars you'll need create a Google API key and save it here.", 'google-calendar-events' ) .
85
  '<br/><br/>' .
86
  '<em style="font-size: 14px;">' .
87
- sprintf( __( '<strong>Note:</strong> A Google API key is not needed for calendars configured to use the <strong><a href="%s" target="_blank">Google Calendar Pro add-on</a></strong>.', 'google-calendar-events' ),
88
  simcal_ga_campaign_url( simcal_get_url( 'gcal-pro' ), 'core-plugin', 'settings-link' )
89
  ) .
90
  '</em>',
84
  'description' => __( "To read events from your public Google Calendars you'll need create a Google API key and save it here.", 'google-calendar-events' ) .
85
  '<br/><br/>' .
86
  '<em style="font-size: 14px;">' .
87
+ sprintf( __( '<strong>Note:</strong> Calendars configured to use the <strong><a href="%s" target="_blank">Google Calendar Pro add-on</a></strong> use a different method of authorization.', 'google-calendar-events' ),
88
  simcal_ga_campaign_url( simcal_get_url( 'gcal-pro' ), 'core-plugin', 'settings-link' )
89
  ) .
90
  '</em>',
includes/feeds/google.php CHANGED
@@ -214,8 +214,8 @@ class Google extends Feed {
214
  if ( is_null( $event->getEnd()->dateTime ) ) {
215
  // Whole day event.
216
  $date = Carbon::parse( $event->getEnd()->date );
217
- $google_end = Carbon::createFromDate( $date->year, $date->month, $date->day, $end_timezone )->endOfDay()->subSeconds( 59 );
218
- $google_end_utc = Carbon::createFromDate( $date->year, $date->month, $date->day, 'UTC' )->endOfDay()->subSeconds( 59 );
219
  } else {
220
  $date = Carbon::parse( $event->getEnd()->dateTime );
221
  $google_end = Carbon::create( $date->year, $date->month, $date->day, $date->hour, $date->minute, $date->second, $end_timezone );
214
  if ( is_null( $event->getEnd()->dateTime ) ) {
215
  // Whole day event.
216
  $date = Carbon::parse( $event->getEnd()->date );
217
+ $google_end = Carbon::createFromDate( $date->year, $date->month, $date->day, $end_timezone )->startOfDay()->subSeconds( 59 );
218
+ $google_end_utc = Carbon::createFromDate( $date->year, $date->month, $date->day, 'UTC' )->startOfDay()->subSeconds( 59 );
219
  } else {
220
  $date = Carbon::parse( $event->getEnd()->dateTime );
221
  $google_end = Carbon::create( $date->year, $date->month, $date->day, $date->hour, $date->minute, $date->second, $end_timezone );
includes/functions/shared.php CHANGED
@@ -358,7 +358,7 @@ function simcal_get_timezone_from_gmt_offset( $offset ) {
358
  $offset = floatval( $offset ) * 3600;
359
  }
360
 
361
- $timezone = timezone_name_from_abbr( null, $offset, true );
362
  // This is buggy and might return false:
363
  // @see http://php.net/manual/en/function.timezone-name-from-abbr.php#86928
364
  // Therefore:
358
  $offset = floatval( $offset ) * 3600;
359
  }
360
 
361
+ $timezone = timezone_name_from_abbr( null, $offset, false );
362
  // This is buggy and might return false:
363
  // @see http://php.net/manual/en/function.timezone-name-from-abbr.php#86928
364
  // Therefore:
languages/google-calendar-events.pot DELETED
@@ -1,1418 +0,0 @@
1
- # Copyright (C) 2015 Moonstone Media
2
- # This file is distributed under the same license as the Simple Calendar package.
3
- msgid ""
4
- msgstr ""
5
- "Project-Id-Version: Simple Calendar 3.0.0\n"
6
- "Report-Msgid-Bugs-To: "
7
- "https://github.com/moonstonemedia/Simple-Calendar/issues\n"
8
- "POT-Creation-Date: 2015-10-01 17:17:03+00:00\n"
9
- "MIME-Version: 1.0\n"
10
- "Content-Type: text/plain; charset=utf-8\n"
11
- "Content-Transfer-Encoding: 8bit\n"
12
- "PO-Revision-Date: 2015-MO-DA HO:MI+ZONE\n"
13
- "Last-Translator: Phil Derksen <pderksen@gmail.com>\n"
14
- "Language-Team: Phil Derksen <pderksen@gmail.com>\n"
15
- "X-Generator: grunt-wp-i18n 0.5.3\n"
16
- "X-Poedit-KeywordsList: "
17
- "__;_e;_x:1,2c;_ex:1,2c;_n:1,2;_nx:1,2,4c;_n_noop:1,2;_nx_noop:1,2,3c;esc_"
18
- "attr__;esc_html__;esc_attr_e;esc_html_e;esc_attr_x:1,2c;esc_html_x:1,2c;\n"
19
- "Language: en_US\n"
20
- "Plural-Forms: nplurals=2; plural=(n != 1);\n"
21
- "X-Poedit-Country: United States\n"
22
- "X-Poedit-SourceCharset: UTF-8\n"
23
- "X-Poedit-Basepath: ../\n"
24
- "X-Poedit-SearchPath-0: .\n"
25
- "X-Poedit-Bookmarks: \n"
26
- "X-Textdomain-Support: yes\n"
27
-
28
- #: includes/admin/fields/checkbox.php:88
29
- #: includes/admin/settings/system-status.php:99
30
- #: includes/admin/settings/system-status.php:102
31
- #: includes/admin/settings/system-status.php:152
32
- #: includes/admin/settings/system-status.php:256
33
- #: includes/admin/settings/system-status.php:369
34
- #: includes/admin/settings/system-status.php:389
35
- #: includes/admin/settings/system-status.php:437
36
- #: includes/admin/settings/system-status.php:442
37
- #: includes/admin/settings/system-status.php:467
38
- #: includes/admin/settings/system-status.php:472
39
- #: includes/admin/settings/system-status.php:477
40
- #: includes/admin/settings/system-status.php:482
41
- msgid "Yes"
42
- msgstr ""
43
-
44
- #: includes/admin/fields/datetime-format.php:94
45
- #: includes/admin/metaboxes/settings.php:549
46
- #: includes/admin/metaboxes/settings.php:571
47
- #: includes/admin/metaboxes/settings.php:622
48
- #: includes/admin/metaboxes/settings.php:644
49
- msgid "Preview"
50
- msgstr ""
51
-
52
- #: includes/admin/fields/datetime-format.php:192
53
- msgid "Weekday"
54
- msgstr ""
55
-
56
- #: includes/admin/fields/datetime-format.php:214
57
- msgid "Day"
58
- msgstr ""
59
-
60
- #: includes/admin/fields/datetime-format.php:236
61
- msgid "Month"
62
- msgstr ""
63
-
64
- #: includes/admin/fields/datetime-format.php:260
65
- msgid "Year"
66
- msgstr ""
67
-
68
- #: includes/admin/fields/datetime-format.php:282
69
- msgid "Hours"
70
- msgstr ""
71
-
72
- #: includes/admin/fields/datetime-format.php:306
73
- msgid "Minutes"
74
- msgstr ""
75
-
76
- #: includes/admin/fields/datetime-format.php:327
77
- msgid "Meridiem"
78
- msgstr ""
79
-
80
- #: includes/admin/menus.php:65 includes/admin/menus.php:66
81
- #: includes/admin/menus.php:103 includes/admin/welcome.php:149
82
- msgid "Settings"
83
- msgstr ""
84
-
85
- #: includes/admin/menus.php:77 includes/admin/menus.php:78
86
- msgid "Tools"
87
- msgstr ""
88
-
89
- #: includes/admin/menus.php:104 includes/admin/settings/calendars.php:38
90
- #: includes/admin/welcome.php:146 includes/post-types.php:164
91
- msgid "Calendars"
92
- msgstr ""
93
-
94
- #: includes/admin/menus.php:126
95
- msgid "Documentation"
96
- msgstr ""
97
-
98
- #: includes/admin/menus.php:127
99
- msgid "Support"
100
- msgstr ""
101
-
102
- #: includes/admin/menus.php:182
103
- msgid ""
104
- "If you like <strong>Simple Calendar</strong> please leave us a "
105
- "%s&#9733;&#9733;&#9733;&#9733;&#9733;%s rating on WordPress.org. A huge "
106
- "thank you in advance!"
107
- msgstr ""
108
-
109
- #: includes/admin/menus.php:183
110
- msgid "Thanks :)"
111
- msgstr ""
112
-
113
- #: includes/admin/menus.php:195
114
- msgid "Thank you for using Simple Calendar!"
115
- msgstr ""
116
-
117
- #: includes/admin/meta-boxes.php:74
118
- msgid "Calendar Settings"
119
- msgstr ""
120
-
121
- #: includes/admin/meta-boxes.php:83
122
- msgid "Calendar Shortcode"
123
- msgstr ""
124
-
125
- #: includes/admin/meta-boxes.php:95
126
- msgid "Attach Calendar"
127
- msgstr ""
128
-
129
- #: includes/admin/metaboxes/attach-calendar.php:55
130
- msgid "After content"
131
- msgstr ""
132
-
133
- #: includes/admin/metaboxes/attach-calendar.php:56
134
- msgid "Before content"
135
- msgstr ""
136
-
137
- #: includes/admin/metaboxes/settings.php:116
138
- #: includes/admin/metaboxes/settings.php:186
139
- msgid "Events"
140
- msgstr ""
141
-
142
- #: includes/admin/metaboxes/settings.php:138 includes/post-types.php:165
143
- #: includes/post-types.php:191 includes/widgets/calendar.php:142
144
- msgid "Calendar"
145
- msgstr ""
146
-
147
- #: includes/admin/metaboxes/settings.php:140
148
- msgid "Calendar to use"
149
- msgstr ""
150
-
151
- #: includes/admin/metaboxes/settings.php:158
152
- msgid "View"
153
- msgstr ""
154
-
155
- #: includes/admin/metaboxes/settings.php:160
156
- msgid "View to display"
157
- msgstr ""
158
-
159
- #: includes/admin/metaboxes/settings.php:192
160
- msgid "Appearance"
161
- msgstr ""
162
-
163
- #: includes/admin/metaboxes/settings.php:201
164
- #: includes/admin/settings/advanced.php:28
165
- msgid "Advanced"
166
- msgstr ""
167
-
168
- #: includes/admin/metaboxes/settings.php:234
169
- msgid "Events settings"
170
- msgstr ""
171
-
172
- #: includes/admin/metaboxes/settings.php:238
173
- msgid "Calendar start"
174
- msgstr ""
175
-
176
- #: includes/admin/metaboxes/settings.php:275
177
- msgid "Days range"
178
- msgstr ""
179
-
180
- #: includes/admin/metaboxes/settings.php:278
181
- msgid "Today"
182
- msgstr ""
183
-
184
- #: includes/admin/metaboxes/settings.php:281
185
- msgid "Now"
186
- msgstr ""
187
-
188
- #: includes/admin/metaboxes/settings.php:284
189
- msgid "Day(s) before today"
190
- msgstr ""
191
-
192
- #: includes/admin/metaboxes/settings.php:287
193
- msgid "Day(s) after today"
194
- msgstr ""
195
-
196
- #: includes/admin/metaboxes/settings.php:289
197
- msgid "Weeks range"
198
- msgstr ""
199
-
200
- #: includes/admin/metaboxes/settings.php:292
201
- msgid "This week"
202
- msgstr ""
203
-
204
- #: includes/admin/metaboxes/settings.php:295
205
- msgid "Week(s) before current"
206
- msgstr ""
207
-
208
- #: includes/admin/metaboxes/settings.php:298
209
- msgid "Week(s) after current"
210
- msgstr ""
211
-
212
- #: includes/admin/metaboxes/settings.php:300
213
- msgid "Months range"
214
- msgstr ""
215
-
216
- #: includes/admin/metaboxes/settings.php:303
217
- msgid "This month"
218
- msgstr ""
219
-
220
- #: includes/admin/metaboxes/settings.php:306
221
- msgid "Month(s) before current"
222
- msgstr ""
223
-
224
- #: includes/admin/metaboxes/settings.php:309
225
- msgid "Month(s) after current"
226
- msgstr ""
227
-
228
- #: includes/admin/metaboxes/settings.php:311
229
- msgid "Years range"
230
- msgstr ""
231
-
232
- #: includes/admin/metaboxes/settings.php:314
233
- msgid "This year"
234
- msgstr ""
235
-
236
- #: includes/admin/metaboxes/settings.php:316
237
- msgid "Year(s) before current"
238
- msgstr ""
239
-
240
- #: includes/admin/metaboxes/settings.php:319
241
- msgid "Year(s) after current"
242
- msgstr ""
243
-
244
- #: includes/admin/metaboxes/settings.php:321
245
- msgid "Other"
246
- msgstr ""
247
-
248
- #: includes/admin/metaboxes/settings.php:324
249
- msgid "Specific date"
250
- msgstr ""
251
-
252
- #: includes/admin/metaboxes/settings.php:342
253
- msgid ""
254
- "The calendar default opening date. It will automatically adapt based on the "
255
- "chosen calendar type."
256
- msgstr ""
257
-
258
- #: includes/admin/metaboxes/settings.php:346
259
- msgid "Earliest event"
260
- msgstr ""
261
-
262
- #: includes/admin/metaboxes/settings.php:373
263
- msgid "Same as start date"
264
- msgstr ""
265
-
266
- #: includes/admin/metaboxes/settings.php:374
267
- msgid "Day(s) before start date"
268
- msgstr ""
269
-
270
- #: includes/admin/metaboxes/settings.php:375
271
- msgid "Week(s) before start date"
272
- msgstr ""
273
-
274
- #: includes/admin/metaboxes/settings.php:376
275
- msgid "Month(s) before start date"
276
- msgstr ""
277
-
278
- #: includes/admin/metaboxes/settings.php:377
279
- msgid "Year(s) before start date"
280
- msgstr ""
281
-
282
- #: includes/admin/metaboxes/settings.php:380
283
- msgid ""
284
- "Set the date for the earliest possible event to show in calendar. There "
285
- "will not be events before this date."
286
- msgstr ""
287
-
288
- #: includes/admin/metaboxes/settings.php:384
289
- msgid "Latest event"
290
- msgstr ""
291
-
292
- #: includes/admin/metaboxes/settings.php:411
293
- msgid "Day end of start date"
294
- msgstr ""
295
-
296
- #: includes/admin/metaboxes/settings.php:412
297
- msgid "Day(s) after start date"
298
- msgstr ""
299
-
300
- #: includes/admin/metaboxes/settings.php:413
301
- msgid "Weeks(s) after start date"
302
- msgstr ""
303
-
304
- #: includes/admin/metaboxes/settings.php:414
305
- msgid "Month(s) after start date"
306
- msgstr ""
307
-
308
- #: includes/admin/metaboxes/settings.php:415
309
- msgid "Year(s) after start date"
310
- msgstr ""
311
-
312
- #: includes/admin/metaboxes/settings.php:418
313
- msgid ""
314
- "Set the date for the latest possible event to show on calendar. There will "
315
- "not be events after this date."
316
- msgstr ""
317
-
318
- #: includes/admin/metaboxes/settings.php:439
319
- msgid "Miscellaneous"
320
- msgstr ""
321
-
322
- #: includes/admin/metaboxes/settings.php:443
323
- msgid "Static calendar"
324
- msgstr ""
325
-
326
- #: includes/admin/metaboxes/settings.php:453
327
- msgid ""
328
- "Depending on the chosen calendar type, it will prevent browsing the "
329
- "calendar, which will be fixed at its opening state."
330
- msgstr ""
331
-
332
- #: includes/admin/metaboxes/settings.php:462
333
- msgid "No events message"
334
- msgstr ""
335
-
336
- #: includes/admin/metaboxes/settings.php:471
337
- msgid ""
338
- "Some calendars may display a message when no events are found. You can "
339
- "change the default message here."
340
- msgstr ""
341
-
342
- #: includes/admin/metaboxes/settings.php:496
343
- msgid "Date and Time"
344
- msgstr ""
345
-
346
- #: includes/admin/metaboxes/settings.php:500
347
- #: includes/admin/settings/system-status.php:145
348
- msgid "Timezone"
349
- msgstr ""
350
-
351
- #: includes/admin/metaboxes/settings.php:525
352
- msgid ""
353
- "Using a different timezone may alter the date and time display of your "
354
- "calendar events. It is recommended to keep the calendar default timezone."
355
- msgstr ""
356
-
357
- #: includes/admin/metaboxes/settings.php:529
358
- msgid "Date format"
359
- msgstr ""
360
-
361
- #: includes/admin/metaboxes/settings.php:545
362
- #: includes/admin/metaboxes/settings.php:618
363
- msgid "Custom (PHP format)"
364
- msgstr ""
365
-
366
- #: includes/admin/metaboxes/settings.php:547
367
- msgid ""
368
- "This option sets how calendars display event dates. It is recommended to "
369
- "keep your site default setting."
370
- msgstr ""
371
-
372
- #: includes/admin/metaboxes/settings.php:568
373
- msgid "Enter a date format using %s values."
374
- msgstr ""
375
-
376
- #: includes/admin/metaboxes/settings.php:578
377
- msgid "Separator"
378
- msgstr ""
379
-
380
- #: includes/admin/metaboxes/settings.php:591
381
- msgid "Used to divide date and time when both are shown."
382
- msgstr ""
383
-
384
- #: includes/admin/metaboxes/settings.php:602
385
- msgid "Time format"
386
- msgstr ""
387
-
388
- #: includes/admin/metaboxes/settings.php:620
389
- msgid ""
390
- "This option sets how calendars display event times. It is recommended to "
391
- "keep your site default setting."
392
- msgstr ""
393
-
394
- #: includes/admin/metaboxes/settings.php:641
395
- msgid "Enter a time format using %s values."
396
- msgstr ""
397
-
398
- #: includes/admin/metaboxes/settings.php:651
399
- msgid "Week starts on"
400
- msgstr ""
401
-
402
- #: includes/admin/metaboxes/settings.php:679
403
- msgid ""
404
- "Some calendars may use this setting to display the start of the week. It is "
405
- "recommended to keep the site default setting."
406
- msgstr ""
407
-
408
- #: includes/admin/metaboxes/settings.php:686
409
- msgid "Cache"
410
- msgstr ""
411
-
412
- #: includes/admin/metaboxes/settings.php:709
413
- msgid "Minute(s)"
414
- msgstr ""
415
-
416
- #: includes/admin/metaboxes/settings.php:710
417
- msgid "Hour(s)"
418
- msgstr ""
419
-
420
- #: includes/admin/metaboxes/settings.php:711
421
- #: includes/calendars/default-calendar.php:329
422
- msgid "Day(s)"
423
- msgstr ""
424
-
425
- #: includes/admin/metaboxes/settings.php:712
426
- #: includes/calendars/default-calendar.php:328
427
- msgid "Week(s)"
428
- msgstr ""
429
-
430
- #: includes/admin/metaboxes/settings.php:714
431
- msgid ""
432
- "If you add, edit or remove events in your calendar very often, you can set "
433
- "a lower interval to refresh the events displayed. Set a higher interval for "
434
- "best performance."
435
- msgstr ""
436
-
437
- #: includes/admin/post-types.php:61
438
- msgid "Events Source"
439
- msgstr ""
440
-
441
- #: includes/admin/post-types.php:62 includes/post-types.php:82
442
- #: includes/post-types.php:83
443
- msgid "Calendar Type"
444
- msgstr ""
445
-
446
- #: includes/admin/post-types.php:63
447
- msgid "Shortcode"
448
- msgstr ""
449
-
450
- #: includes/admin/post-types.php:129
451
- msgid "Clone"
452
- msgstr ""
453
-
454
- #: includes/admin/post-types.php:130
455
- msgid "Clear Cache"
456
- msgstr ""
457
-
458
- #: includes/admin/post-types.php:169 includes/admin/post-types.php:236
459
- msgid "Clear cache"
460
- msgstr ""
461
-
462
- #: includes/admin/post-types.php:174
463
- msgid "Cache cleared."
464
- msgstr ""
465
-
466
- #: includes/admin/post-types.php:191
467
- msgid "Copy"
468
- msgstr ""
469
-
470
- #: includes/admin/post-types.php:265 includes/admin/post-types.php:285
471
- msgid "Add Calendar"
472
- msgstr ""
473
-
474
- #: includes/admin/post-types.php:286
475
- msgid "Add a calendar to your post."
476
- msgstr ""
477
-
478
- #: includes/admin/post-types.php:299
479
- msgid "Insert Calendar"
480
- msgstr ""
481
-
482
- #: includes/admin/post-types.php:301
483
- msgid "Could not find any calendars to add to this post."
484
- msgstr ""
485
-
486
- #: includes/admin/post-types.php:302
487
- msgid "Please add and configure new calendar first."
488
- msgstr ""
489
-
490
- #: includes/admin/settings/advanced.php:29
491
- msgid "Advanced settings."
492
- msgstr ""
493
-
494
- #: includes/admin/settings/advanced.php:42
495
- msgid "Scripts and Styles"
496
- msgstr ""
497
-
498
- #: includes/admin/settings/advanced.php:43
499
- msgid ""
500
- "Manage front end assets that handle the calendars appearance and user "
501
- "interface."
502
- msgstr ""
503
-
504
- #: includes/admin/settings/advanced.php:46
505
- msgid "Installation"
506
- msgstr ""
507
-
508
- #: includes/admin/settings/advanced.php:47
509
- msgid "Manage your data (plugin settings and saved calendars)."
510
- msgstr ""
511
-
512
- #: includes/admin/settings/advanced.php:68
513
- msgid "Disable Styles"
514
- msgstr ""
515
-
516
- #: includes/admin/settings/advanced.php:69
517
- msgid "If ticked, this option will prevent front end stylesheet to load."
518
- msgstr ""
519
-
520
- #: includes/admin/settings/advanced.php:76
521
- msgid "Disable Scripts"
522
- msgstr ""
523
-
524
- #: includes/admin/settings/advanced.php:77
525
- msgid "If ticked, this option will prevent front end JavaScript to load."
526
- msgstr ""
527
-
528
- #: includes/admin/settings/advanced.php:89
529
- msgid "Delete settings"
530
- msgstr ""
531
-
532
- #: includes/admin/settings/advanced.php:90
533
- msgid ""
534
- "Tick this option if you want to wipe this plugin settings from database "
535
- "when uninstalling."
536
- msgstr ""
537
-
538
- #: includes/admin/settings/advanced.php:97
539
- msgid "Erase calendar data"
540
- msgstr ""
541
-
542
- #: includes/admin/settings/advanced.php:98
543
- msgid ""
544
- "By default your data will be retained in database even after uninstall. "
545
- "Tick this option if you want to delete all your calendar data when "
546
- "uninstalling."
547
- msgstr ""
548
-
549
- #: includes/admin/settings/calendars.php:39
550
- msgid "Manage calendar preferences and calendar types settings and options."
551
- msgstr ""
552
-
553
- #: includes/admin/settings/calendars.php:71
554
- msgid "General"
555
- msgstr ""
556
-
557
- #: includes/admin/settings/calendars.php:131
558
- msgid "Attach Calendars"
559
- msgstr ""
560
-
561
- #: includes/admin/settings/calendars.php:132
562
- msgid ""
563
- "You can choose on which content types to add the ability to attach "
564
- "calendars."
565
- msgstr ""
566
-
567
- #: includes/admin/settings/feeds.php:38
568
- msgid "Events Sources"
569
- msgstr ""
570
-
571
- #: includes/admin/settings/feeds.php:39
572
- msgid "Manage your calendar feeds settings and options."
573
- msgstr ""
574
-
575
- #: includes/admin/settings/system-status.php:29
576
- msgid "System Report"
577
- msgstr ""
578
-
579
- #: includes/admin/settings/system-status.php:50
580
- msgid "Please copy and paste this information when contacting support:"
581
- msgstr ""
582
-
583
- #: includes/admin/settings/system-status.php:52
584
- msgid ""
585
- "You can also download your information as a text file to attach, or simply "
586
- "view it below."
587
- msgstr ""
588
-
589
- #: includes/admin/settings/system-status.php:53
590
- msgid "Download System Report"
591
- msgstr ""
592
-
593
- #: includes/admin/settings/system-status.php:64
594
- msgid "WordPress Installation"
595
- msgstr ""
596
-
597
- #: includes/admin/settings/system-status.php:68
598
- msgid "Active Theme"
599
- msgstr ""
600
-
601
- #: includes/admin/settings/system-status.php:72
602
- msgid "Active Plugins"
603
- msgstr ""
604
-
605
- #: includes/admin/settings/system-status.php:76
606
- msgid "Server Environment"
607
- msgstr ""
608
-
609
- #: includes/admin/settings/system-status.php:80
610
- msgid "Client Information"
611
- msgstr ""
612
-
613
- #: includes/admin/settings/system-status.php:97
614
- #: includes/admin/settings/system-status.php:152
615
- #: includes/admin/settings/system-status.php:256
616
- #: includes/admin/settings/system-status.php:372
617
- #: includes/admin/settings/system-status.php:392
618
- #: includes/admin/settings/system-status.php:442
619
- #: includes/admin/settings/system-status.php:467
620
- #: includes/admin/settings/system-status.php:472
621
- #: includes/admin/settings/system-status.php:477
622
- #: includes/admin/settings/system-status.php:482
623
- msgid "No"
624
- msgstr ""
625
-
626
- #: includes/admin/settings/system-status.php:108
627
- msgid ""
628
- "%1$s - It is recomendend to set memory to at least 64MB. See: <a "
629
- "href=\"%2$s\" target=\"_blank\">Increasing memory allocated to PHP</a>"
630
- msgstr ""
631
-
632
- #: includes/admin/settings/system-status.php:120
633
- msgid "Site Name"
634
- msgstr ""
635
-
636
- #: includes/admin/settings/system-status.php:125
637
- msgid "Home URL"
638
- msgstr ""
639
-
640
- #: includes/admin/settings/system-status.php:130
641
- msgid "Site URL"
642
- msgstr ""
643
-
644
- #: includes/admin/settings/system-status.php:135
645
- #: includes/admin/settings/system-status.php:218
646
- #: includes/admin/settings/system-status.php:238
647
- #: includes/admin/settings/system-status.php:312
648
- msgid "Version"
649
- msgstr ""
650
-
651
- #: includes/admin/settings/system-status.php:140
652
- msgid "Locale"
653
- msgstr ""
654
-
655
- #: includes/admin/settings/system-status.php:150
656
- msgid "Multisite"
657
- msgstr ""
658
-
659
- #: includes/admin/settings/system-status.php:156
660
- msgid "Permalinks"
661
- msgstr ""
662
-
663
- #: includes/admin/settings/system-status.php:208
664
- #: includes/admin/settings/system-status.php:301
665
- msgid "%s is available"
666
- msgstr ""
667
-
668
- #: includes/admin/settings/system-status.php:214
669
- #: includes/admin/settings/system-status.php:234
670
- msgid "Name"
671
- msgstr ""
672
-
673
- #: includes/admin/settings/system-status.php:216
674
- #: includes/admin/settings/system-status.php:236
675
- #: includes/admin/settings/system-status.php:310
676
- msgid "Author"
677
- msgstr ""
678
-
679
- #: includes/admin/settings/system-status.php:248
680
- msgid "Theme Information"
681
- msgstr ""
682
-
683
- #: includes/admin/settings/system-status.php:254
684
- msgid "Child Theme"
685
- msgstr ""
686
-
687
- #: includes/admin/settings/system-status.php:260
688
- msgid "Parent Theme"
689
- msgstr ""
690
-
691
- #: includes/admin/settings/system-status.php:335
692
- msgid ""
693
- "%1$s - It is recomendend to upgrade at least to PHP version 5.4 for "
694
- "security reasons. <a href=\"%2$s\" target=\"_blank\">Read more.</a>"
695
- msgstr ""
696
-
697
- #: includes/admin/settings/system-status.php:355
698
- msgid "Server default timezone is %s - it should be UTC"
699
- msgstr ""
700
-
701
- #: includes/admin/settings/system-status.php:413
702
- msgid "Web Server"
703
- msgstr ""
704
-
705
- #: includes/admin/settings/system-status.php:418
706
- msgid "PHP Version"
707
- msgstr ""
708
-
709
- #: includes/admin/settings/system-status.php:424
710
- msgid "MySQL Version"
711
- msgstr ""
712
-
713
- #: includes/admin/settings/system-status.php:430
714
- msgid "Server Timezone"
715
- msgstr ""
716
-
717
- #: includes/admin/settings/system-status.php:505
718
- msgid "Name:"
719
- msgstr ""
720
-
721
- #: includes/admin/settings/system-status.php:507
722
- msgid "Version:"
723
- msgstr ""
724
-
725
- #: includes/admin/settings/system-status.php:509
726
- msgid "User Agent:"
727
- msgstr ""
728
-
729
- #: includes/admin/settings/system-status.php:511
730
- msgid "Platform:"
731
- msgstr ""
732
-
733
- #: includes/admin/settings/system-status.php:519
734
- msgid "IP Address"
735
- msgstr ""
736
-
737
- #: includes/admin/settings/system-status.php:524
738
- msgid "Browser"
739
- msgstr ""
740
-
741
- #: includes/admin/welcome.php:46
742
- msgid "About Simple Calendar"
743
- msgstr ""
744
-
745
- #: includes/admin/welcome.php:47
746
- msgid "Welcome to Simple Calendar"
747
- msgstr ""
748
-
749
- #: includes/admin/welcome.php:119
750
- #. Translators: %s prints the current major version of the plugin.
751
- msgid "Welcome to Simple Calendar %s"
752
- msgstr ""
753
-
754
- #: includes/admin/welcome.php:125
755
- msgid "Thanks, all done!"
756
- msgstr ""
757
-
758
- #: includes/admin/welcome.php:127
759
- msgid "Thank you for updating to the latest version!"
760
- msgstr ""
761
-
762
- #: includes/admin/welcome.php:129
763
- msgid "Thanks for installing!"
764
- msgstr ""
765
-
766
- #: includes/admin/welcome.php:135
767
- #. Translators: %s prints the current major version of the plugin.
768
- msgid ""
769
- "Simple Calendar %s is more powerful, stable and secure than ever before. We "
770
- "hope you really enjoy using it."
771
- msgstr ""
772
-
773
- #: includes/admin/welcome.php:152
774
- msgid "Docs"
775
- msgstr ""
776
-
777
- #: includes/admin/welcome.php:155
778
- msgid "Announcements"
779
- msgstr ""
780
-
781
- #: includes/admin/welcome.php:163
782
- msgid "What's New"
783
- msgstr ""
784
-
785
- #: includes/admin/welcome.php:168
786
- msgid "Credits"
787
- msgstr ""
788
-
789
- #: includes/admin/welcome.php:173
790
- msgid "Translators"
791
- msgstr ""
792
-
793
- #: includes/admin/welcome.php:194
794
- msgid "Go to Calendars"
795
- msgstr ""
796
-
797
- #: includes/admin/welcome.php:197
798
- msgid "Go to Settings"
799
- msgstr ""
800
-
801
- #: includes/admin/welcome.php:218
802
- msgid ""
803
- "Simple Calendar is developed and maintained by a worldwide growing number "
804
- "of passionate individuals and backed by an awesome developer community. "
805
- "Want to see your name? <a href=\"%s\">Contribute to Simple Calendar</a>."
806
- msgstr ""
807
-
808
- #: includes/admin/welcome.php:240
809
- msgid ""
810
- "Simple Calendar has been kindly translated into several other languages by "
811
- "contributors from all over the World. Want to see your name? <a "
812
- "href=\"%s\">Translate Simple Calendar</a>."
813
- msgstr ""
814
-
815
- #: includes/admin/welcome.php:279
816
- msgid "View %s"
817
- msgstr ""
818
-
819
- #: includes/calendars/default-calendar.php:82
820
- msgid "Default"
821
- msgstr ""
822
-
823
- #: includes/calendars/default-calendar.php:84
824
- #: includes/calendars/views/default-calendar-grid.php:81
825
- msgid "Grid"
826
- msgstr ""
827
-
828
- #: includes/calendars/default-calendar.php:85
829
- #: includes/calendars/views/default-calendar-list.php:97
830
- msgid "List"
831
- msgstr ""
832
-
833
- #: includes/calendars/default-calendar.php:224
834
- msgid "Default calendar"
835
- msgstr ""
836
-
837
- #: includes/calendars/default-calendar.php:228
838
- msgid "Event bubbles"
839
- msgstr ""
840
-
841
- #: includes/calendars/default-calendar.php:239
842
- msgid ""
843
- "Open event bubbles in calendar grid by clicking or hovering on event "
844
- "titles. On mobile devices it will always default to tapping."
845
- msgstr ""
846
-
847
- #: includes/calendars/default-calendar.php:243
848
- msgid "Click"
849
- msgstr ""
850
-
851
- #: includes/calendars/default-calendar.php:244
852
- msgid "Hover"
853
- msgstr ""
854
-
855
- #: includes/calendars/default-calendar.php:252
856
- msgid "Trim event titles"
857
- msgstr ""
858
-
859
- #: includes/calendars/default-calendar.php:277
860
- msgid "Shorten event titles in calendar grid to a specified length in characters."
861
- msgstr ""
862
-
863
- #: includes/calendars/default-calendar.php:292
864
- msgid "Span"
865
- msgstr ""
866
-
867
- #: includes/calendars/default-calendar.php:320
868
- msgid "Range of events to show on each calendar page."
869
- msgstr ""
870
-
871
- #: includes/calendars/default-calendar.php:327
872
- msgid "Month(s)"
873
- msgstr ""
874
-
875
- #: includes/calendars/default-calendar.php:330
876
- msgid "Event(s)"
877
- msgstr ""
878
-
879
- #: includes/calendars/default-calendar.php:338
880
- msgid "Compact list"
881
- msgstr ""
882
-
883
- #: includes/calendars/default-calendar.php:348
884
- msgid ""
885
- "Make an events list more compact by grouping together events from different "
886
- "days in a single list."
887
- msgstr ""
888
-
889
- #: includes/calendars/default-calendar.php:357
890
- msgid "Limit visible events"
891
- msgstr ""
892
-
893
- #: includes/calendars/default-calendar.php:385
894
- msgid "Limit the number of initial visible events on each day to a set maximum."
895
- msgstr ""
896
-
897
- #: includes/calendars/default-calendar.php:400
898
- msgid "Expand multi day events"
899
- msgstr ""
900
-
901
- #: includes/calendars/default-calendar.php:408
902
- msgid "Show events spanning multiple days on each day."
903
- msgstr ""
904
-
905
- #: includes/calendars/views/default-calendar-grid.php:174
906
- msgid "Previous Month"
907
- msgstr ""
908
-
909
- #: includes/calendars/views/default-calendar-grid.php:207
910
- msgid "Next Month"
911
- msgstr ""
912
-
913
- #: includes/calendars/views/default-calendar-grid.php:384
914
- msgid "Event"
915
- msgstr ""
916
-
917
- #: includes/calendars/views/default-calendar-list.php:173
918
- msgid "Previous"
919
- msgstr ""
920
-
921
- #: includes/calendars/views/default-calendar-list.php:183
922
- msgid "Next"
923
- msgstr ""
924
-
925
- #: includes/calendars/views/default-calendar-list.php:535
926
- msgid "Nothing to show."
927
- msgstr ""
928
-
929
- #: includes/calendars/views/default-calendar-list.php:546
930
- msgid "Nothing from %1$s to %2$s."
931
- msgstr ""
932
-
933
- #: includes/events/event-builder.php:243
934
- msgid "No end time"
935
- msgstr ""
936
-
937
- #: includes/events/event-builder.php:781
938
- msgid "1 more attendee"
939
- msgid_plural "%s more attendees"
940
- msgstr[0] ""
941
- msgstr[1] ""
942
-
943
- #: includes/events/event-builder.php:783
944
- msgid "1 anonymous attendee"
945
- msgid_plural "%s anonymous attendees"
946
- msgstr[0] ""
947
- msgstr[1] ""
948
-
949
- #: includes/events/event-builder.php:788
950
- msgid "No one yet"
951
- msgstr ""
952
-
953
- #: includes/events/event-builder.php:806
954
- msgid "Attending"
955
- msgstr ""
956
-
957
- #: includes/events/event-builder.php:808
958
- msgid "Not attending"
959
- msgstr ""
960
-
961
- #: includes/events/event-builder.php:810
962
- msgid "Maybe attending"
963
- msgstr ""
964
-
965
- #: includes/events/event-builder.php:812
966
- msgid "Response pending"
967
- msgstr ""
968
-
969
- #: includes/feeds/admin/google-admin.php:81
970
- msgid "Google API Key"
971
- msgstr ""
972
-
973
- #: includes/feeds/admin/google-admin.php:115
974
- msgid ""
975
- "Please enter a valid Google API Key (<a href=\"%s\" target=\"_blank\">see "
976
- "documentation</a>). "
977
- msgstr ""
978
-
979
- #: includes/feeds/admin/google-admin.php:156
980
- msgid "Calendar ID"
981
- msgstr ""
982
-
983
- #: includes/feeds/admin/google-admin.php:157
984
- msgid ""
985
- "Visit your Google Calendar account, choose or subscribe a public calendar, "
986
- "copy and paste its ID here."
987
- msgstr ""
988
-
989
- #: includes/feeds/admin/google-admin.php:158
990
- msgid "Enter a valid Google Calendar ID from a public calendar"
991
- msgstr ""
992
-
993
- #: includes/feeds/admin/google-admin.php:167
994
- msgid "Search query"
995
- msgstr ""
996
-
997
- #: includes/feeds/admin/google-admin.php:168
998
- msgid ""
999
- "Type in keywords if you only want display events that match these terms. "
1000
- "You can use basic boolean search operators too."
1001
- msgstr ""
1002
-
1003
- #: includes/feeds/admin/google-admin.php:169
1004
- msgid "Filter events to display by search terms..."
1005
- msgstr ""
1006
-
1007
- #: includes/feeds/admin/google-admin.php:175
1008
- msgid "Recurring events"
1009
- msgstr ""
1010
-
1011
- #: includes/feeds/admin/google-admin.php:176
1012
- msgid "Events that are programmed to repeat themselves periodically."
1013
- msgstr ""
1014
-
1015
- #: includes/feeds/admin/google-admin.php:178
1016
- msgid "Show all"
1017
- msgstr ""
1018
-
1019
- #: includes/feeds/admin/google-admin.php:179
1020
- msgid "Only show first occurrence"
1021
- msgstr ""
1022
-
1023
- #: includes/feeds/admin/google-admin.php:187
1024
- msgid "Maximum Events"
1025
- msgstr ""
1026
-
1027
- #: includes/feeds/admin/google-admin.php:188
1028
- msgid ""
1029
- "Google Calendar only allows to query for a maximum amount of 2500 events "
1030
- "from a calendar each time."
1031
- msgstr ""
1032
-
1033
- #: includes/feeds/admin/google-admin.php:205
1034
- msgid "Google Calendar settings"
1035
- msgstr ""
1036
-
1037
- #: includes/feeds/admin/google-admin.php:235
1038
- msgid ""
1039
- "1. Set the Google Calendar you want to use as \"public\" (<a href=\"%1s\" "
1040
- "target=\"_blank\">see documentation</a>)."
1041
- msgstr ""
1042
-
1043
- #: includes/feeds/admin/google-admin.php:236
1044
- msgid ""
1045
- "2. Find and paste in the field above your Google Calendar ID (<a "
1046
- "href=\"%2s\" target=\"_blank\">see documentation</a>)."
1047
- msgstr ""
1048
-
1049
- #: includes/feeds/admin/google-admin.php:252
1050
- msgid ""
1051
- "If you want to add events from a Google Calendar feed, you need to set a "
1052
- "Google API Key first. <a href=\"%s\">Go to settings to add one</a>."
1053
- msgstr ""
1054
-
1055
- #: includes/feeds/admin/google-admin.php:282 includes/feeds/google.php:266
1056
- msgid "While trying to retrieve events, Google returned an error:"
1057
- msgstr ""
1058
-
1059
- #: includes/feeds/admin/google-admin.php:284 includes/feeds/google.php:268
1060
- msgid ""
1061
- "Please ensure that both your Google Calendar ID and API Key are valid and "
1062
- "that the Google Calendar you want to display is public."
1063
- msgstr ""
1064
-
1065
- #: includes/feeds/admin/grouped-calendars-admin.php:76
1066
- msgid "Grouped Calendars settings"
1067
- msgstr ""
1068
-
1069
- #: includes/feeds/admin/grouped-calendars-admin.php:80
1070
- msgid "Get calendars from"
1071
- msgstr ""
1072
-
1073
- #: includes/feeds/admin/grouped-calendars-admin.php:92
1074
- msgid "Manual selection"
1075
- msgstr ""
1076
-
1077
- #: includes/feeds/admin/grouped-calendars-admin.php:93
1078
- #: includes/post-types.php:118
1079
- msgid "Category"
1080
- msgstr ""
1081
-
1082
- #: includes/feeds/admin/grouped-calendars-admin.php:95
1083
- msgid ""
1084
- "Choose from which calendar feeds you want to get events from. Choose them "
1085
- "individually or select all those belonging to calendar feed categories."
1086
- msgstr ""
1087
-
1088
- #: includes/feeds/admin/grouped-calendars-admin.php:113
1089
- #: includes/feeds/admin/grouped-calendars-admin.php:139
1090
- msgid "No results found."
1091
- msgstr ""
1092
-
1093
- #: includes/feeds/admin/grouped-calendars-admin.php:147
1094
- msgid "There are no calendar categories yet."
1095
- msgstr ""
1096
-
1097
- #: includes/feeds/google.php:93
1098
- msgid "Google Calendar"
1099
- msgstr ""
1100
-
1101
- #: includes/feeds/google.php:269
1102
- msgid "Only you can see this notice."
1103
- msgstr ""
1104
-
1105
- #: includes/feeds/grouped-calendars.php:42
1106
- msgid "Grouped Calendars"
1107
- msgstr ""
1108
-
1109
- #: includes/functions/admin.php:225
1110
- msgid "Press %s to copy."
1111
- msgstr ""
1112
-
1113
- #: includes/functions/shared.php:223
1114
- msgid "Click for more details."
1115
- msgstr ""
1116
-
1117
- #: includes/post-types.php:45
1118
- msgid "Events Source Types"
1119
- msgstr ""
1120
-
1121
- #: includes/post-types.php:46 includes/post-types.php:47
1122
- msgid "Events Source Type"
1123
- msgstr ""
1124
-
1125
- #: includes/post-types.php:48
1126
- msgid "All Events Source Types"
1127
- msgstr ""
1128
-
1129
- #: includes/post-types.php:49
1130
- msgid "Parent Events Source Type"
1131
- msgstr ""
1132
-
1133
- #: includes/post-types.php:50
1134
- msgid "Parent Events Source Type:"
1135
- msgstr ""
1136
-
1137
- #: includes/post-types.php:51
1138
- msgid "New Events Source Type"
1139
- msgstr ""
1140
-
1141
- #: includes/post-types.php:52
1142
- msgid "Add New Events Source Type"
1143
- msgstr ""
1144
-
1145
- #: includes/post-types.php:53
1146
- msgid "Edit Events Source Type"
1147
- msgstr ""
1148
-
1149
- #: includes/post-types.php:54
1150
- msgid "Update Events Source Type"
1151
- msgstr ""
1152
-
1153
- #: includes/post-types.php:55
1154
- msgid "View Events Source Type"
1155
- msgstr ""
1156
-
1157
- #: includes/post-types.php:56
1158
- msgid "Separate events source types with commas"
1159
- msgstr ""
1160
-
1161
- #: includes/post-types.php:57
1162
- msgid "Add or remove events source types"
1163
- msgstr ""
1164
-
1165
- #: includes/post-types.php:58 includes/post-types.php:94
1166
- #: includes/post-types.php:130
1167
- msgid "Choose from the most used"
1168
- msgstr ""
1169
-
1170
- #: includes/post-types.php:59
1171
- msgid "Popular events source types"
1172
- msgstr ""
1173
-
1174
- #: includes/post-types.php:60
1175
- msgid "Search Events Source Types"
1176
- msgstr ""
1177
-
1178
- #: includes/post-types.php:61 includes/post-types.php:97
1179
- #: includes/post-types.php:133
1180
- msgid "Not Found"
1181
- msgstr ""
1182
-
1183
- #: includes/post-types.php:81
1184
- msgid "Calendar Types"
1185
- msgstr ""
1186
-
1187
- #: includes/post-types.php:84
1188
- msgid "All Calendar Types"
1189
- msgstr ""
1190
-
1191
- #: includes/post-types.php:85
1192
- msgid "Parent Calendar Type"
1193
- msgstr ""
1194
-
1195
- #: includes/post-types.php:86
1196
- msgid "Parent Calendar Type:"
1197
- msgstr ""
1198
-
1199
- #: includes/post-types.php:87
1200
- msgid "New Calendar Type"
1201
- msgstr ""
1202
-
1203
- #: includes/post-types.php:88
1204
- msgid "Add New Calendar Type"
1205
- msgstr ""
1206
-
1207
- #: includes/post-types.php:89
1208
- msgid "Edit Calendar Type"
1209
- msgstr ""
1210
-
1211
- #: includes/post-types.php:90
1212
- msgid "Update Calendar Type"
1213
- msgstr ""
1214
-
1215
- #: includes/post-types.php:91
1216
- msgid "View Calendar Type"
1217
- msgstr ""
1218
-
1219
- #: includes/post-types.php:92
1220
- msgid "Separate calendar types with commas"
1221
- msgstr ""
1222
-
1223
- #: includes/post-types.php:93
1224
- msgid "Add or remove calendar types"
1225
- msgstr ""
1226
-
1227
- #: includes/post-types.php:95
1228
- msgid "Popular calendar types"
1229
- msgstr ""
1230
-
1231
- #: includes/post-types.php:96
1232
- msgid "Search Calendar Types"
1233
- msgstr ""
1234
-
1235
- #: includes/post-types.php:117 includes/post-types.php:119
1236
- msgid "Categories"
1237
- msgstr ""
1238
-
1239
- #: includes/post-types.php:120
1240
- msgid "All Categories"
1241
- msgstr ""
1242
-
1243
- #: includes/post-types.php:121
1244
- msgid "Parent Category"
1245
- msgstr ""
1246
-
1247
- #: includes/post-types.php:122
1248
- msgid "Parent Category:"
1249
- msgstr ""
1250
-
1251
- #: includes/post-types.php:123
1252
- msgid "New Category"
1253
- msgstr ""
1254
-
1255
- #: includes/post-types.php:124
1256
- msgid "Add New Category"
1257
- msgstr ""
1258
-
1259
- #: includes/post-types.php:125
1260
- msgid "Edit Category"
1261
- msgstr ""
1262
-
1263
- #: includes/post-types.php:126
1264
- msgid "Update Category"
1265
- msgstr ""
1266
-
1267
- #: includes/post-types.php:127
1268
- msgid "View Category"
1269
- msgstr ""
1270
-
1271
- #: includes/post-types.php:128
1272
- msgid "Separate categories with commas"
1273
- msgstr ""
1274
-
1275
- #: includes/post-types.php:129
1276
- msgid "Add or remove categories"
1277
- msgstr ""
1278
-
1279
- #: includes/post-types.php:131
1280
- msgid "Popular Categories"
1281
- msgstr ""
1282
-
1283
- #: includes/post-types.php:132
1284
- msgid "Search Categories"
1285
- msgstr ""
1286
-
1287
- #: includes/post-types.php:166
1288
- msgid "Parent Calendar:"
1289
- msgstr ""
1290
-
1291
- #: includes/post-types.php:167
1292
- msgid "All Calendars"
1293
- msgstr ""
1294
-
1295
- #: includes/post-types.php:168
1296
- msgid "Add New Calendar"
1297
- msgstr ""
1298
-
1299
- #: includes/post-types.php:169
1300
- msgid "Add New"
1301
- msgstr ""
1302
-
1303
- #: includes/post-types.php:170
1304
- msgid "New Calendar"
1305
- msgstr ""
1306
-
1307
- #: includes/post-types.php:171
1308
- msgid "Edit Calendar"
1309
- msgstr ""
1310
-
1311
- #: includes/post-types.php:172
1312
- msgid "Update Calendar"
1313
- msgstr ""
1314
-
1315
- #: includes/post-types.php:173
1316
- msgid "View Calendar"
1317
- msgstr ""
1318
-
1319
- #: includes/post-types.php:174
1320
- msgid "Search Calendar"
1321
- msgstr ""
1322
-
1323
- #: includes/post-types.php:175
1324
- msgid "Calendars not found"
1325
- msgstr ""
1326
-
1327
- #: includes/post-types.php:176
1328
- msgid "Calendars not found in Trash"
1329
- msgstr ""
1330
-
1331
- #. Plugin Name of the plugin/theme
1332
- msgid "Simple Calendar"
1333
- msgstr ""
1334
-
1335
- #: includes/widgets/calendar.php:47
1336
- msgid "Display a calendar of events from one of your calendar feeds."
1337
- msgstr ""
1338
-
1339
- #: includes/widgets/calendar.php:149
1340
- msgid "Title:"
1341
- msgstr ""
1342
-
1343
- #: includes/widgets/calendar.php:159
1344
- msgid "Calendar:"
1345
- msgstr ""
1346
-
1347
- #: includes/widgets/calendar.php:164
1348
- msgid "No calendars found."
1349
- msgstr ""
1350
-
1351
- #. Plugin URI of the plugin/theme
1352
- msgid "https://wordpress.org/plugins/google-calendar-events/"
1353
- msgstr ""
1354
-
1355
- #. Description of the plugin/theme
1356
- msgid ""
1357
- "Show off your Google calendar in grid (month) or list view, in a post, page "
1358
- "or widget, and in a style that matches your site."
1359
- msgstr ""
1360
-
1361
- #. Author of the plugin/theme
1362
- msgid "Moonstone Media"
1363
- msgstr ""
1364
-
1365
- #. Author URI of the plugin/theme
1366
- msgid "http://moonstonemediagroup.com"
1367
- msgstr ""
1368
-
1369
- #: includes/admin/fields/datetime-format.php:349
1370
- msgctxt "A character to separate two elements"
1371
- msgid "Divider"
1372
- msgstr ""
1373
-
1374
- #: includes/admin/metaboxes/settings.php:118
1375
- msgctxt "From which calendar source to load events from"
1376
- msgid "Get events from"
1377
- msgstr ""
1378
-
1379
- #: includes/admin/metaboxes/settings.php:515
1380
- msgctxt "Use the calendar default setting"
1381
- msgid "Events source default"
1382
- msgstr ""
1383
-
1384
- #: includes/admin/metaboxes/settings.php:516
1385
- #: includes/admin/metaboxes/settings.php:543
1386
- #: includes/admin/metaboxes/settings.php:616
1387
- #: includes/admin/metaboxes/settings.php:666
1388
- msgctxt "Use this site default setting"
1389
- msgid "Site default"
1390
- msgstr ""
1391
-
1392
- #: includes/admin/metaboxes/settings.php:517
1393
- #: includes/admin/metaboxes/settings.php:544
1394
- #: includes/admin/metaboxes/settings.php:617
1395
- #: includes/admin/metaboxes/settings.php:667
1396
- msgctxt "Use a custom setting"
1397
- msgid "Custom"
1398
- msgstr ""
1399
-
1400
- #: includes/admin/metaboxes/settings.php:698
1401
- msgctxt "Cache maximum interval"
1402
- msgid "Refresh interval"
1403
- msgstr ""
1404
-
1405
- #: includes/admin/welcome.php:141
1406
- msgctxt "Plugin version"
1407
- msgid "Version %s"
1408
- msgstr ""
1409
-
1410
- #: includes/post-types.php:162
1411
- msgctxt "Post Type General Name"
1412
- msgid "Calendars"
1413
- msgstr ""
1414
-
1415
- #: includes/post-types.php:163
1416
- msgctxt "Post Type Singular Name"
1417
- msgid "Calendar"
1418
- msgstr ""
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
languages/index.php DELETED
@@ -1,8 +0,0 @@
1
- <?php
2
- /**
3
- * Do not put custom translations here.
4
- * They will be deleted upon plugin updates.
5
- *
6
- * Keep your custom translations in /wp-content/languages/simple-calendar/
7
- * They will override plugin translations.
8
- */
 
 
 
 
 
 
 
 
languages/readme.md DELETED
@@ -1,13 +0,0 @@
1
- # Simple Calendar language files
2
-
3
- To help translate, review, or improve a translation, join our translation community at [Transifex](https://www.transifex.com/moonstonemedia/simple-calendar/).
4
-
5
- [Read more on how to contribute](https://github.com/moonstonemedia/Simple-Calendar/blob/refactor/contributing.md#add-or-update-translations).
6
-
7
- **Do not send pull requests on GitHub for adding translations files here.**
8
-
9
- **Do not place your own translations file in this directory locally or they will be deleted at the next plugin update.**
10
-
11
- If you want to add custom translations in your local copy, you may place them in `/wp-content/languages/simple-calendar/`.
12
-
13
- Keep in mind that custom translations will override translations for the same languages provided by the plugin.
 
 
 
 
 
 
 
 
 
 
 
 
 
languages/readme.txt DELETED
@@ -1,11 +0,0 @@
1
- Do not put custom translations here.
2
- They will be deleted when the plugin updates.
3
-
4
- Please help us translating or improving a translation:
5
- https://www.transifex.com/projects/p/simple-calendar/
6
-
7
- If you want to add custom translations in your local copy,
8
- you may place them in /wp-content/languages/simple-calendar/
9
-
10
- Keep in mind that custom translations will override translations
11
- for the same languages provided by the plugin.
 
 
 
 
 
 
 
 
 
 
 
readme.txt CHANGED
@@ -1,9 +1,9 @@
1
- === Simple Calendar (aka Google Calendar Events) ===
2
  Contributors: moonstonemedia, pderksen, nickyoung87, nekojira, rosshanney
3
  Tags: calendar, calendars, calendar manager, custom calendar, custom calendars, event, events, events feed, google calendar, google
4
  Requires at least: 4.0
5
  Tested up to: 4.4
6
- Stable tag: 3.0.8
7
  License: GPLv2 or later
8
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
9
 
@@ -11,7 +11,7 @@ Add Google Calendar events to your WordPress site in minutes. Beautiful calendar
11
 
12
  == Description ==
13
 
14
- [Simple Calendar](https://simplecalendar.io) is the easiest way to add Google Calendar events to your WordPress site. Keep managing everything in Google Calendar. Fine tune the display of your calendars to your liking. Add advanced features with add-ons.
15
 
16
  = SIMPLE CALENDAR FEATURES =
17
 
@@ -27,6 +27,8 @@ Add Google Calendar events to your WordPress site in minutes. Beautiful calendar
27
  * Fully extensible to support add-ons with advanced features for more specific needs.
28
  * Open source with code hosted on GitHub. [Contributions welcome!](https://github.com/moonstonemedia/Simple-Calendar)
29
 
 
 
30
  >**[Love the plugin? Please consider purchasing our Google Calendar Pro add-on](https://simplecalendar.io/addons/google-calendar-pro/?utm_source=wordpress.org&utm_medium=link&utm_campaign=simple-cal-readme&utm_content=description)**
31
 
32
  = GOOGLE CALENDAR PRO ADD-ON FEATURES =
@@ -78,6 +80,14 @@ We'd love your help! Here's a few things you can do:
78
 
79
  == Changelog ==
80
 
 
 
 
 
 
 
 
 
81
  = 3.0.8 - December 1, 2015 =
82
 
83
  * Fix: Fixed bug for Google Calendar Pro add-on organizer event builder code.
1
+ === Simple Calendar - Google Calendar Plugin ===
2
  Contributors: moonstonemedia, pderksen, nickyoung87, nekojira, rosshanney
3
  Tags: calendar, calendars, calendar manager, custom calendar, custom calendars, event, events, events feed, google calendar, google
4
  Requires at least: 4.0
5
  Tested up to: 4.4
6
+ Stable tag: 3.0.9
7
  License: GPLv2 or later
8
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
9
 
11
 
12
  == Description ==
13
 
14
+ [Simple Calendar](https://simplecalendar.io/?utm_source=wordpress.org&utm_medium=link&utm_campaign=simple-cal-readme&utm_content=description) is the easiest way to add Google Calendar events to your WordPress site. Keep managing everything in Google Calendar. Fine tune the display of your calendars to your liking. Add advanced features with add-ons.
15
 
16
  = SIMPLE CALENDAR FEATURES =
17
 
27
  * Fully extensible to support add-ons with advanced features for more specific needs.
28
  * Open source with code hosted on GitHub. [Contributions welcome!](https://github.com/moonstonemedia/Simple-Calendar)
29
 
30
+ **[Try out a Live Demo](http://demo.simplecalendar.io/?utm_source=wordpress.org&utm_medium=link&utm_campaign=simple-cal-readme&utm_content=description)**
31
+
32
  >**[Love the plugin? Please consider purchasing our Google Calendar Pro add-on](https://simplecalendar.io/addons/google-calendar-pro/?utm_source=wordpress.org&utm_medium=link&utm_campaign=simple-cal-readme&utm_content=description)**
33
 
34
  = GOOGLE CALENDAR PRO ADD-ON FEATURES =
80
 
81
  == Changelog ==
82
 
83
+ = 3.0.9 - December 16, 2015 =
84
+
85
+ * Fix: Fixed all-day events with an end time showing on an extra day.
86
+ * Fix: Fixed a bug with site default timezone setting not pulling in correctly.
87
+ * Tweak: Make always enqueue option enabled by default for new installs.
88
+ * Tweak: Translations moved from .po/.mo files to official wordpress.org translation packs.
89
+ * Tweak: Minor text fixes to admin UI.
90
+
91
  = 3.0.8 - December 1, 2015 =
92
 
93
  * Fix: Fixed bug for Google Calendar Pro add-on organizer event builder code.
vendor/autoload_52.php CHANGED
@@ -4,4 +4,4 @@
4
 
5
  require_once dirname(__FILE__) . '/composer'.'/autoload_real_52.php';
6
 
7
- return ComposerAutoloaderInit27040a253c81c51e285a136069f687e1::getLoader();
4
 
5
  require_once dirname(__FILE__) . '/composer'.'/autoload_real_52.php';
6
 
7
+ return ComposerAutoloaderInit2dc39a0b64306b8942369cfefab762df::getLoader();
vendor/composer/ClassLoader.php CHANGED
@@ -344,7 +344,7 @@ class ClassLoader
344
  private function findFileWithExtension($class, $ext)
345
  {
346
  // PSR-4 lookup
347
- $logicalPathPsr4 = strtr($class, '\\', DIRECTORY_SEPARATOR) . $ext;
348
 
349
  $first = $class[0];
350
  if (isset($this->prefixLengthsPsr4[$first])) {
@@ -370,10 +370,10 @@ class ClassLoader
370
  if (false !== $pos = strrpos($class, '\\')) {
371
  // namespaced class name
372
  $logicalPathPsr0 = substr($logicalPathPsr4, 0, $pos + 1)
373
- . strtr(substr($logicalPathPsr4, $pos + 1), '_', DIRECTORY_SEPARATOR);
374
  } else {
375
  // PEAR-like class name
376
- $logicalPathPsr0 = strtr($class, '_', DIRECTORY_SEPARATOR) . $ext;
377
  }
378
 
379
  if (isset($this->prefixesPsr0[$first])) {
344
  private function findFileWithExtension($class, $ext)
345
  {
346
  // PSR-4 lookup
347
+ $logicalPathPsr4 = ('\\' !== DIRECTORY_SEPARATOR ? str_replace('\\', DIRECTORY_SEPARATOR, $class) : $class) . $ext;
348
 
349
  $first = $class[0];
350
  if (isset($this->prefixLengthsPsr4[$first])) {
370
  if (false !== $pos = strrpos($class, '\\')) {
371
  // namespaced class name
372
  $logicalPathPsr0 = substr($logicalPathPsr4, 0, $pos + 1)
373
+ . str_replace('_', DIRECTORY_SEPARATOR, substr($logicalPathPsr4, $pos + 1));
374
  } else {
375
  // PEAR-like class name
376
+ $logicalPathPsr0 = str_replace('_', DIRECTORY_SEPARATOR, $class) . $ext;
377
  }
378
 
379
  if (isset($this->prefixesPsr0[$first])) {
vendor/composer/autoload_classmap.php CHANGED
@@ -8,6 +8,66 @@ $baseDir = dirname($vendorDir);
8
  return array(
9
  'Carbon\\Carbon' => $vendorDir . '/nesbot/carbon/src/Carbon/Carbon.php',
10
  'Carbon\\CarbonInterval' => $vendorDir . '/nesbot/carbon/src/Carbon/CarbonInterval.php',
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
11
  'Google_Auth_Abstract' => $vendorDir . '/google/apiclient/src/Google/Auth/Abstract.php',
12
  'Google_Auth_AppIdentity' => $vendorDir . '/google/apiclient/src/Google/Auth/AppIdentity.php',
13
  'Google_Auth_AssertionCredentials' => $vendorDir . '/google/apiclient/src/Google/Auth/AssertionCredentials.php',
8
  return array(
9
  'Carbon\\Carbon' => $vendorDir . '/nesbot/carbon/src/Carbon/Carbon.php',
10
  'Carbon\\CarbonInterval' => $vendorDir . '/nesbot/carbon/src/Carbon/CarbonInterval.php',
11
+ 'Composer\\Installers\\AglInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/AglInstaller.php',
12
+ 'Composer\\Installers\\AimeosInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/AimeosInstaller.php',
13
+ 'Composer\\Installers\\AnnotateCmsInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/AnnotateCmsInstaller.php',
14
+ 'Composer\\Installers\\AsgardInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/AsgardInstaller.php',
15
+ 'Composer\\Installers\\BaseInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/BaseInstaller.php',
16
+ 'Composer\\Installers\\BitrixInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/BitrixInstaller.php',
17
+ 'Composer\\Installers\\BonefishInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/BonefishInstaller.php',
18
+ 'Composer\\Installers\\CakePHPInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/CakePHPInstaller.php',
19
+ 'Composer\\Installers\\ChefInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/ChefInstaller.php',
20
+ 'Composer\\Installers\\ClanCatsFrameworkInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/ClanCatsFrameworkInstaller.php',
21
+ 'Composer\\Installers\\CodeIgniterInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/CodeIgniterInstaller.php',
22
+ 'Composer\\Installers\\Concrete5Installer' => $vendorDir . '/composer/installers/src/Composer/Installers/Concrete5Installer.php',
23
+ 'Composer\\Installers\\CraftInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/CraftInstaller.php',
24
+ 'Composer\\Installers\\CroogoInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/CroogoInstaller.php',
25
+ 'Composer\\Installers\\DokuWikiInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/DokuWikiInstaller.php',
26
+ 'Composer\\Installers\\DolibarrInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/DolibarrInstaller.php',
27
+ 'Composer\\Installers\\DrupalInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/DrupalInstaller.php',
28
+ 'Composer\\Installers\\ElggInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/ElggInstaller.php',
29
+ 'Composer\\Installers\\FuelInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/FuelInstaller.php',
30
+ 'Composer\\Installers\\FuelphpInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/FuelphpInstaller.php',
31
+ 'Composer\\Installers\\GravInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/GravInstaller.php',
32
+ 'Composer\\Installers\\HuradInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/HuradInstaller.php',
33
+ 'Composer\\Installers\\Installer' => $vendorDir . '/composer/installers/src/Composer/Installers/Installer.php',
34
+ 'Composer\\Installers\\JoomlaInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/JoomlaInstaller.php',
35
+ 'Composer\\Installers\\KirbyInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/KirbyInstaller.php',
36
+ 'Composer\\Installers\\KodiCMSInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/KodiCMSInstaller.php',
37
+ 'Composer\\Installers\\KohanaInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/KohanaInstaller.php',
38
+ 'Composer\\Installers\\LaravelInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/LaravelInstaller.php',
39
+ 'Composer\\Installers\\LithiumInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/LithiumInstaller.php',
40
+ 'Composer\\Installers\\MODULEWorkInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/MODULEWorkInstaller.php',
41
+ 'Composer\\Installers\\MODXEvoInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/MODXEvoInstaller.php',
42
+ 'Composer\\Installers\\MagentoInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/MagentoInstaller.php',
43
+ 'Composer\\Installers\\MakoInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/MakoInstaller.php',
44
+ 'Composer\\Installers\\MediaWikiInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/MediaWikiInstaller.php',
45
+ 'Composer\\Installers\\MicroweberInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/MicroweberInstaller.php',
46
+ 'Composer\\Installers\\MoodleInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/MoodleInstaller.php',
47
+ 'Composer\\Installers\\OctoberInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/OctoberInstaller.php',
48
+ 'Composer\\Installers\\OxidInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/OxidInstaller.php',
49
+ 'Composer\\Installers\\PPIInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/PPIInstaller.php',
50
+ 'Composer\\Installers\\PhpBBInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/PhpBBInstaller.php',
51
+ 'Composer\\Installers\\PimcoreInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/PimcoreInstaller.php',
52
+ 'Composer\\Installers\\PiwikInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/PiwikInstaller.php',
53
+ 'Composer\\Installers\\Plugin' => $vendorDir . '/composer/installers/src/Composer/Installers/Plugin.php',
54
+ 'Composer\\Installers\\PrestashopInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/PrestashopInstaller.php',
55
+ 'Composer\\Installers\\PuppetInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/PuppetInstaller.php',
56
+ 'Composer\\Installers\\RedaxoInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/RedaxoInstaller.php',
57
+ 'Composer\\Installers\\RoundcubeInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/RoundcubeInstaller.php',
58
+ 'Composer\\Installers\\SMFInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/SMFInstaller.php',
59
+ 'Composer\\Installers\\ShopwareInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/ShopwareInstaller.php',
60
+ 'Composer\\Installers\\SilverStripeInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/SilverStripeInstaller.php',
61
+ 'Composer\\Installers\\Symfony1Installer' => $vendorDir . '/composer/installers/src/Composer/Installers/Symfony1Installer.php',
62
+ 'Composer\\Installers\\TYPO3CmsInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/TYPO3CmsInstaller.php',
63
+ 'Composer\\Installers\\TYPO3FlowInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/TYPO3FlowInstaller.php',
64
+ 'Composer\\Installers\\TheliaInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/TheliaInstaller.php',
65
+ 'Composer\\Installers\\TuskInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/TuskInstaller.php',
66
+ 'Composer\\Installers\\WHMCSInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/WHMCSInstaller.php',
67
+ 'Composer\\Installers\\WolfCMSInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/WolfCMSInstaller.php',
68
+ 'Composer\\Installers\\WordPressInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/WordPressInstaller.php',
69
+ 'Composer\\Installers\\ZendInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/ZendInstaller.php',
70
+ 'Composer\\Installers\\ZikulaInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/ZikulaInstaller.php',
71
  'Google_Auth_Abstract' => $vendorDir . '/google/apiclient/src/Google/Auth/Abstract.php',
72
  'Google_Auth_AppIdentity' => $vendorDir . '/google/apiclient/src/Google/Auth/AppIdentity.php',
73
  'Google_Auth_AssertionCredentials' => $vendorDir . '/google/apiclient/src/Google/Auth/AssertionCredentials.php',
vendor/composer/autoload_namespaces.php CHANGED
@@ -8,5 +8,6 @@ $baseDir = dirname($vendorDir);
8
  return array(
9
  'xrstf\\Composer52' => array($vendorDir . '/xrstf/composer-php52/lib'),
10
  'Parsedown' => array($vendorDir . '/erusev/parsedown'),
 
11
  '' => array($vendorDir . '/nekojira/wp-requirements/src'),
12
  );
8
  return array(
9
  'xrstf\\Composer52' => array($vendorDir . '/xrstf/composer-php52/lib'),
10
  'Parsedown' => array($vendorDir . '/erusev/parsedown'),
11
+ 'Composer\\Installers\\' => array($vendorDir . '/composer/installers/src'),
12
  '' => array($vendorDir . '/nekojira/wp-requirements/src'),
13
  );
vendor/composer/autoload_real_52.php CHANGED
@@ -2,7 +2,7 @@
2
 
3
  // autoload_real_52.php generated by xrstf/composer-php52
4
 
5
- class ComposerAutoloaderInit27040a253c81c51e285a136069f687e1 {
6
  private static $loader;
7
 
8
  public static function loadClassLoader($class) {
@@ -19,9 +19,9 @@ class ComposerAutoloaderInit27040a253c81c51e285a136069f687e1 {
19
  return self::$loader;
20
  }
21
 
22
- spl_autoload_register(array('ComposerAutoloaderInit27040a253c81c51e285a136069f687e1', 'loadClassLoader'), true /*, true */);
23
  self::$loader = $loader = new xrstf_Composer52_ClassLoader();
24
- spl_autoload_unregister(array('ComposerAutoloaderInit27040a253c81c51e285a136069f687e1', 'loadClassLoader'));
25
 
26
  $vendorDir = dirname(dirname(__FILE__));
27
  $baseDir = dirname($vendorDir);
2
 
3
  // autoload_real_52.php generated by xrstf/composer-php52
4
 
5
+ class ComposerAutoloaderInit2dc39a0b64306b8942369cfefab762df {
6
  private static $loader;
7
 
8
  public static function loadClassLoader($class) {
19
  return self::$loader;
20
  }
21
 
22
+ spl_autoload_register(array('ComposerAutoloaderInit2dc39a0b64306b8942369cfefab762df', 'loadClassLoader'), true /*, true */);
23
  self::$loader = $loader = new xrstf_Composer52_ClassLoader();
24
+ spl_autoload_unregister(array('ComposerAutoloaderInit2dc39a0b64306b8942369cfefab762df', 'loadClassLoader'));
25
 
26
  $vendorDir = dirname(dirname(__FILE__));
27
  $baseDir = dirname($vendorDir);
vendor/composer/installed.json CHANGED
@@ -423,5 +423,105 @@
423
  ],
424
  "description": "Symfony Translation Component",
425
  "homepage": "https://symfony.com"
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
426
  }
427
  ]
423
  ],
424
  "description": "Symfony Translation Component",
425
  "homepage": "https://symfony.com"
426
+ },
427
+ {
428
+ "name": "composer/installers",
429
+ "version": "v1.0.22",
430
+ "version_normalized": "1.0.22.0",
431
+ "source": {
432
+ "type": "git",
433
+ "url": "https://github.com/composer/installers.git",
434
+ "reference": "bd9b14f094c89c8b5804a4e41edeb7853bb85046"
435
+ },
436
+ "dist": {
437
+ "type": "zip",
438
+ "url": "https://api.github.com/repos/composer/installers/zipball/bd9b14f094c89c8b5804a4e41edeb7853bb85046",
439
+ "reference": "bd9b14f094c89c8b5804a4e41edeb7853bb85046",
440
+ "shasum": ""
441
+ },
442
+ "require": {
443
+ "composer-plugin-api": "1.0.0"
444
+ },
445
+ "replace": {
446
+ "roundcube/plugin-installer": "*",
447
+ "shama/baton": "*"
448
+ },
449
+ "require-dev": {
450
+ "composer/composer": "1.0.*@dev",
451
+ "phpunit/phpunit": "4.1.*"
452
+ },
453
+ "time": "2015-10-29 23:28:48",
454
+ "type": "composer-plugin",
455
+ "extra": {
456
+ "class": "Composer\\Installers\\Plugin",
457
+ "branch-alias": {
458
+ "dev-master": "1.0-dev"
459
+ }
460
+ },
461
+ "installation-source": "source",
462
+ "autoload": {
463
+ "psr-0": {
464
+ "Composer\\Installers\\": "src/"
465
+ }
466
+ },
467
+ "notification-url": "https://packagist.org/downloads/",
468
+ "license": [
469
+ "MIT"
470
+ ],
471
+ "authors": [
472
+ {
473
+ "name": "Kyle Robinson Young",
474
+ "email": "kyle@dontkry.com",
475
+ "homepage": "https://github.com/shama"
476
+ }
477
+ ],
478
+ "description": "A multi-framework Composer library installer",
479
+ "homepage": "http://composer.github.com/installers/",
480
+ "keywords": [
481
+ "Craft",
482
+ "Dolibarr",
483
+ "Hurad",
484
+ "MODX Evo",
485
+ "OXID",
486
+ "SMF",
487
+ "Thelia",
488
+ "WolfCMS",
489
+ "agl",
490
+ "aimeos",
491
+ "annotatecms",
492
+ "bitrix",
493
+ "cakephp",
494
+ "chef",
495
+ "codeigniter",
496
+ "concrete5",
497
+ "croogo",
498
+ "dokuwiki",
499
+ "drupal",
500
+ "elgg",
501
+ "fuelphp",
502
+ "grav",
503
+ "installer",
504
+ "joomla",
505
+ "kohana",
506
+ "laravel",
507
+ "lithium",
508
+ "magento",
509
+ "mako",
510
+ "mediawiki",
511
+ "modulework",
512
+ "moodle",
513
+ "phpbb",
514
+ "piwik",
515
+ "ppi",
516
+ "puppet",
517
+ "roundcube",
518
+ "shopware",
519
+ "silverstripe",
520
+ "symfony",
521
+ "typo3",
522
+ "wordpress",
523
+ "zend",
524
+ "zikula"
525
+ ]
526
  }
527
  ]
vendor/composer/installers/LICENSE ADDED
@@ -0,0 +1,19 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ Copyright (c) 2012 Kyle Robinson Young
2
+
3
+ Permission is hereby granted, free of charge, to any person obtaining a copy
4
+ of this software and associated documentation files (the "Software"), to deal
5
+ in the Software without restriction, including without limitation the rights
6
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
7
+ copies of the Software, and to permit persons to whom the Software is furnished
8
+ to do so, subject to the following conditions:
9
+
10
+ The above copyright notice and this permission notice shall be included in all
11
+ copies or substantial portions of the Software.
12
+
13
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
14
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
15
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
16
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
17
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
18
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
19
+ THE SOFTWARE.
vendor/composer/installers/README.md ADDED
@@ -0,0 +1,193 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # A Multi-Framework [Composer](http://getcomposer.org) Library Installer
2
+
3
+ [![Build Status](http://img.shields.io/travis/composer/installers.svg)](http://travis-ci.org/composer/installers)
4
+
5
+ This is for PHP package authors to require in their `composer.json`. It will
6
+ install their package to the correct location based on the specified package
7
+ type.
8
+
9
+ The goal of `installers` is to be a simple package type to install path map.
10
+ Users can also customize the install path per package and package authors can
11
+ modify the package name upon installing.
12
+
13
+ `installers` isn't intended on replacing all custom installers. If your
14
+ package requires special installation handling then by all means, create a
15
+ custom installer to handle it.
16
+
17
+ **Natively Supported Frameworks**:
18
+
19
+ The following frameworks natively work with Composer and will be
20
+ installed to the default `vendor` directory. `composer/installers`
21
+ is not needed to install packages with these frameworks:
22
+
23
+ * Aura
24
+ * Symfony2
25
+ * Yii
26
+ * Yii2
27
+
28
+ **Current Supported Package Types**:
29
+
30
+ > Stable types are marked as **bold**, this means that installation paths
31
+ > for those type will not be changed. Any adjustment for those types would
32
+ > require creation of brand new type that will cover required changes.
33
+
34
+ | Framework | Types
35
+ | --------- | -----
36
+ | Aimeos | `aimeos-extension`
37
+ | Asgard | `asgard-module`<br>`asgard-theme`
38
+ | AGL | `agl-module`
39
+ | Bonefish | `bonefish-package`
40
+ | AnnotateCms | `annotatecms-module`<br>`annotatecms-component`<br>`annotatecms-service`
41
+ | Bitrix | `bitrix-module`<br>`bitrix-component`<br>`bitrix-theme`
42
+ | CakePHP 2+ | **`cakephp-plugin`**
43
+ | Chef | `chef-cookbook`<br>`chef-role`
44
+ | CCFramework | `ccframework-ship`<br>`ccframework-theme`
45
+ | CodeIgniter | `codeigniter-library`<br>`codeigniter-third-party`<br>`codeigniter-module`
46
+ | concrete5 | `concrete5-block`<br>`concrete5-package`<br>`concrete5-theme`<br>`concrete5-update`
47
+ | Craft | `craft-plugin`
48
+ | Croogo | `croogo-plugin`<br>`croogo-theme`
49
+ | DokuWiki | `dokuwiki-plugin`<br>`dokuwiki-template`
50
+ | Dolibarr | `dolibarr-module`
51
+ | Drupal | <b>`drupal-module`<br>`drupal-theme`</b><br>`drupal-library`<br>`drupal-profile`<br>`drupal-drush`
52
+ | Elgg | `elgg-plugin`
53
+ | FuelPHP v1.x | `fuel-module`<br>`fuel-package`<br/>`fuel-theme`
54
+ | FuelPHP v2.x | `fuelphp-component`
55
+ | Grav | `grav-plugin`<br>`grav-theme`
56
+ | Hurad | `hurad-plugin`<br>`hurad-theme`
57
+ | Joomla | `joomla-component`<br>`joomla-module`<br>`joomla-template`<br>`joomla-plugin`<br>`joomla-library`
58
+ | Kirby | **`kirby-plugin`**
59
+ | KodiCMS | `kodicms-plugin`<br>`kodicms-media`
60
+ | Kohana | **`kohana-module`**
61
+ | Laravel | `laravel-library`
62
+ | Lithium | **`lithium-library`<br>`lithium-source`**
63
+ | Magento | `magento-library`<br>`magento-skin`<br>`magento-theme`
64
+ | Mako | `mako-package`
65
+ | MODX Evo | `modxevo-snippet`<br>`modxevo-plugin`<br>`modxevo-module`<br>`modxevo-template`<br>`modxevo-lib`
66
+ | MediaWiki | `mediawiki-extension`
67
+ | October | **`october-module`<br>`october-plugin`<br>`october-theme`**
68
+ | OXID | `oxid-module`<br>`oxid-theme`<br>`oxid-out`
69
+ | MODULEWork | `modulework-module`
70
+ | Moodle | `moodle-*` (Please [check source](https://raw.githubusercontent.com/composer/installers/master/src/Composer/Installers/MoodleInstaller.php) for all supported types)
71
+ | Piwik | `piwik-plugin`
72
+ | phpBB | `phpbb-extension`<br>`phpbb-style`<br>`phpbb-language`
73
+ | Pimcore | `pimcore-plugin`
74
+ | PPI | **`ppi-module`**
75
+ | Puppet | `puppet-module`
76
+ | REDAXO | `redaxo-addon`
77
+ | Roundcube | `roundcube-plugin`
78
+ | shopware | `shopware-backend-plugin`<br/>`shopware-core-plugin`<br/>`shopware-frontend-plugin`<br/>`shopware-theme`
79
+ | SilverStripe | `silverstripe-module`<br>`silverstripe-theme`
80
+ | SMF | `smf-module`<br>`smf-theme`
81
+ | symfony1 | **`symfony1-plugin`**
82
+ | Tusk | `tusk-task`<br>`tusk-command`<br>`tusk-asset`
83
+ | 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`
84
+ | TYPO3 CMS | `typo3-cms-extension`
85
+ | Wolf CMS | `wolfcms-plugin`
86
+ | WordPress | <b>`wordpress-plugin`<br>`wordpress-theme`</b><br>`wordpress-muplugin`
87
+ | Zend | `zend-library`<br>`zend-extra`<br>`zend-module`
88
+ | Zikula | `zikula-module`<br>`zikula-theme`
89
+ | Prestashop | `prestashop-module`<br>`prestashop-theme`
90
+
91
+ ## Example `composer.json` File
92
+
93
+ This is an example for a CakePHP plugin. The only important parts to set in your
94
+ composer.json file are `"type": "cakephp-plugin"` which describes what your
95
+ package is and `"require": { "composer/installers": "~1.0" }` which tells composer
96
+ to load the custom installers.
97
+
98
+ ```json
99
+ {
100
+ "name": "you/ftp",
101
+ "type": "cakephp-plugin",
102
+ "require": {
103
+ "composer/installers": "~1.0"
104
+ }
105
+ }
106
+ ```
107
+
108
+ This would install your package to the `Plugin/Ftp/` folder of a CakePHP app
109
+ when a user runs `php composer.phar install`.
110
+
111
+ So submit your packages to [packagist.org](http://packagist.org)!
112
+
113
+ ## Custom Install Paths
114
+
115
+ If you are consuming a package that uses the `composer/installers` you can
116
+ override the install path with the following extra in your `composer.json`:
117
+
118
+ ```json
119
+ {
120
+ "extra": {
121
+ "installer-paths": {
122
+ "your/custom/path/{$name}/": ["shama/ftp", "vendor/package"]
123
+ }
124
+ }
125
+ }
126
+ ```
127
+
128
+ A package type can have a custom installation path with a `type:` prefix.
129
+
130
+ ``` json
131
+ {
132
+ "extra": {
133
+ "installer-paths": {
134
+ "your/custom/path/{$name}/": ["type:wordpress-plugin"]
135
+ }
136
+ }
137
+ }
138
+ ```
139
+
140
+ This would use your custom path for each of the listed packages. The available
141
+ variables to use in your paths are: `{$name}`, `{$vendor}`, `{$type}`.
142
+
143
+ ## Custom Install Names
144
+
145
+ If you're a package author and need your package to be named differently when
146
+ installed consider using the `installer-name` extra.
147
+
148
+ For example you have a package named `shama/cakephp-ftp` with the type
149
+ `cakephp-plugin`. Installing with `composer/installers` would install to the
150
+ path `Plugin/CakephpFtp`. Due to the strict naming conventions, you as a
151
+ package author actually need the package to be named and installed to
152
+ `Plugin/Ftp`. Using the following config within your **package** `composer.json`
153
+ will allow this:
154
+
155
+ ```json
156
+ {
157
+ "name": "shama/cakephp-ftp",
158
+ "type": "cakephp-plugin",
159
+ "extra": {
160
+ "installer-name": "Ftp"
161
+ }
162
+ }
163
+ ```
164
+
165
+ Please note the name entered into `installer-name` will be the final and will
166
+ not be inflected.
167
+
168
+ ## Contribute!
169
+
170
+ * [Fork and clone](https://help.github.com/articles/fork-a-repo).
171
+ * Run the command `php composer.phar install` to install the dependencies.
172
+ This will also install the dev dependencies. See [Composer](https://getcomposer.org/doc/03-cli.md#install).
173
+ * Use the command `phpunit` to run the tests. See [PHPUnit](http://phpunit.de).
174
+ * Create a branch, commit, push and send us a
175
+ [pull request](https://help.github.com/articles/using-pull-requests).
176
+
177
+ To ensure a consistent code base, you should make sure the code follows the
178
+ [Coding Standards](http://symfony.com/doc/2.0/contributing/code/standards.html)
179
+ which we borrowed from Symfony.
180
+
181
+ If you would like to help, please take a look at the list of
182
+ [issues](https://github.com/composer/installers/issues).
183
+
184
+ ### Should we allow dynamic package types or paths? No.
185
+ What are they? The ability for a package author to determine where a package
186
+ will be installed either through setting the path directly in their
187
+ `composer.json` or through a dynamic package type: `"type":
188
+ "framework-install-here"`.
189
+
190
+ It has been proposed many times. Even implemented once early on and then
191
+ removed. `installers` won't do this because it would allow a single package
192
+ author to wipe out entire folders without the user's consent. That user would
193
+ then come here to yell at us.
vendor/composer/installers/composer.json ADDED
@@ -0,0 +1,80 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "name": "composer/installers",
3
+ "type": "composer-plugin",
4
+ "license": "MIT",
5
+ "description": "A multi-framework Composer library installer",
6
+ "keywords": [
7
+ "installer",
8
+ "Aimeos",
9
+ "AGL",
10
+ "AnnotateCms",
11
+ "Bitrix",
12
+ "CakePHP",
13
+ "Chef",
14
+ "CodeIgniter",
15
+ "concrete5",
16
+ "Craft",
17
+ "Croogo",
18
+ "DokuWiki",
19
+ "Dolibarr",
20
+ "Drupal",
21
+ "Elgg",
22
+ "FuelPHP",
23
+ "Grav",
24
+ "Hurad",
25
+ "Joomla",
26
+ "Kohana",
27
+ "Laravel",
28
+ "Lithium",
29
+ "Magento",
30
+ "Mako",
31
+ "MODX Evo",
32
+ "MediaWiki",
33
+ "OXID",
34
+ "MODULEWork",
35
+ "Moodle",
36
+ "Piwik",
37
+ "phpBB",
38
+ "PPI",
39
+ "Puppet",
40
+ "Roundcube",
41
+ "shopware",
42
+ "SilverStripe",
43
+ "SMF",
44
+ "symfony",
45
+ "Thelia",
46
+ "TYPO3",
47
+ "WolfCMS",
48
+ "WordPress",
49
+ "Zend",
50
+ "Zikula"
51
+ ],
52
+ "homepage": "http://composer.github.com/installers/",
53
+ "authors": [
54
+ {
55
+ "name": "Kyle Robinson Young",
56
+ "email": "kyle@dontkry.com",
57
+ "homepage": "https://github.com/shama"
58
+ }
59
+ ],
60
+ "autoload": {
61
+ "psr-0": { "Composer\\Installers\\": "src/" }
62
+ },
63
+ "extra": {
64
+ "class": "Composer\\Installers\\Plugin",
65
+ "branch-alias": {
66
+ "dev-master": "1.0-dev"
67
+ }
68
+ },
69
+ "replace": {
70
+ "shama/baton": "*",
71
+ "roundcube/plugin-installer": "*"
72
+ },
73
+ "require": {
74
+ "composer-plugin-api": "1.0.0"
75
+ },
76
+ "require-dev": {
77
+ "composer/composer": "1.0.*@dev",
78
+ "phpunit/phpunit": "4.1.*"
79
+ }
80
+ }
vendor/composer/installers/phpunit.xml.dist ADDED
@@ -0,0 +1,25 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+
3
+ <phpunit backupGlobals="false"
4
+ backupStaticAttributes="false"
5
+ colors="true"
6
+ convertErrorsToExceptions="true"
7
+ convertNoticesToExceptions="true"
8
+ convertWarningsToExceptions="true"
9
+ processIsolation="false"
10
+ stopOnFailure="false"
11
+ syntaxCheck="false"
12
+ bootstrap="tests/bootstrap.php"
13
+ >
14
+ <testsuites>
15
+ <testsuite name="Installers Test Suite">
16
+ <directory>tests/Composer/Installers</directory>
17
+ </testsuite>
18
+ </testsuites>
19
+
20
+ <filter>
21
+ <whitelist>
22
+ <directory>src/Composer/Installers</directory>
23
+ </whitelist>
24
+ </filter>
25
+ </phpunit>
vendor/composer/installers/src/Composer/Installers/AglInstaller.php ADDED
@@ -0,0 +1,21 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ namespace Composer\Installers;
3
+
4
+ class AglInstaller extends BaseInstaller
5
+ {
6
+ protected $locations = array(
7
+ 'module' => 'More/{$name}/',
8
+ );
9
+
10
+ /**
11
+ * Format package name to CamelCase
12
+ */
13
+ public function inflectPackageVars($vars)
14
+ {
15
+ $vars['name'] = preg_replace_callback('/(?:^|_|-)(.?)/', function ($matches) {
16
+ return strtoupper($matches[1]);
17
+ }, $vars['name']);
18
+
19
+ return $vars;
20
+ }
21
+ }
vendor/composer/installers/src/Composer/Installers/AimeosInstaller.php ADDED
@@ -0,0 +1,9 @@
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ namespace Composer\Installers;
3
+
4
+ class AimeosInstaller extends BaseInstaller
5
+ {
6
+ protected $locations = array(
7
+ 'extension' => 'ext/{$name}/',
8
+ );
9
+ }
vendor/composer/installers/src/Composer/Installers/AnnotateCmsInstaller.php ADDED
@@ -0,0 +1,11 @@
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ namespace Composer\Installers;
3
+
4
+ class AnnotateCmsInstaller extends BaseInstaller
5
+ {
6
+ protected $locations = array(
7
+ 'module' => 'addons/modules/{$name}/',
8
+ 'component' => 'addons/components/{$name}/',
9
+ 'service' => 'addons/services/{$name}/',
10
+ );
11
+ }
vendor/composer/installers/src/Composer/Installers/AsgardInstaller.php ADDED
@@ -0,0 +1,45 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ namespace Composer\Installers;
3
+
4
+ class AsgardInstaller extends BaseInstaller
5
+ {
6
+ protected $locations = array(
7
+ 'module' => 'Modules/{$name}/',
8
+ 'theme' => 'Themes/{$name}/'
9
+ );
10
+
11
+ /**
12
+ * Format package name.
13
+ *
14
+ * For package type asgard-module, cut off a trailing '-plugin' if present.
15
+ *
16
+ * For package type asgard-theme, cut off a trailing '-theme' if present.
17
+ *
18
+ */
19
+ public function inflectPackageVars($vars)
20
+ {
21
+ if ($vars['type'] === 'asgard-module') {
22
+ return $this->inflectPluginVars($vars);
23
+ }
24
+
25
+ if ($vars['type'] === 'asgard-theme') {
26
+ return $this->inflectThemeVars($vars);
27
+ }
28
+
29
+ return $vars;
30
+ }
31
+
32
+ protected function inflectPluginVars($vars)
33
+ {
34
+ $vars['name'] = ucfirst(preg_replace('/-module/', '', $vars['name']));
35
+
36
+ return $vars;
37
+ }
38
+
39
+ protected function inflectThemeVars($vars)
40
+ {
41
+ $vars['name'] = ucfirst(preg_replace('/-theme$/', '', $vars['name']));
42
+
43
+ return $vars;
44
+ }
45
+ }
vendor/composer/installers/src/Composer/Installers/BaseInstaller.php ADDED
@@ -0,0 +1,135 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ namespace Composer\Installers;
3
+
4
+ use Composer\IO\IOInterface;
5
+ use Composer\Composer;
6
+ use Composer\Package\PackageInterface;
7
+
8
+ abstract class BaseInstaller
9
+ {
10
+ protected $locations = array();
11
+ protected $composer;
12
+ protected $package;
13
+ protected $io;
14
+
15
+ /**
16
+ * Initializes base installer.
17
+ *
18
+ * @param PackageInterface $package
19
+ * @param Composer $composer
20
+ * @param IOInterface $io
21
+ */
22
+ public function __construct(PackageInterface $package = null, Composer $composer = null, IOInterface $io = null)
23
+ {
24
+ $this->composer = $composer;
25
+ $this->package = $package;
26
+ $this->io = $io;
27
+ }
28
+
29
+ /**
30
+ * Return the install path based on package type.
31
+ *
32
+ * @param PackageInterface $package
33
+ * @param string $frameworkType
34
+ * @return string
35
+ */
36
+ public function getInstallPath(PackageInterface $package, $frameworkType = '')
37
+ {
38
+ $type = $this->package->getType();
39
+
40
+ $prettyName = $this->package->getPrettyName();
41
+ if (strpos($prettyName, '/') !== false) {
42
+ list($vendor, $name) = explode('/', $prettyName);
43
+ } else {
44
+ $vendor = '';
45
+ $name = $prettyName;
46
+ }
47
+
48
+ $availableVars = $this->inflectPackageVars(compact('name', 'vendor', 'type'));
49
+
50
+ $extra = $package->getExtra();
51
+ if (!empty($extra['installer-name'])) {
52
+ $availableVars['name'] = $extra['installer-name'];
53
+ }
54
+
55
+ if ($this->composer->getPackage()) {
56
+ $extra = $this->composer->getPackage()->getExtra();
57
+ if (!empty($extra['installer-paths'])) {
58
+ $customPath = $this->mapCustomInstallPaths($extra['installer-paths'], $prettyName, $type);
59
+ if ($customPath !== false) {
60
+ return $this->templatePath($customPath, $availableVars);
61
+ }
62
+ }
63
+ }
64
+
65
+ $packageType = substr($type, strlen($frameworkType) + 1);
66
+ $locations = $this->getLocations();
67
+ if (!isset($locations[$packageType])) {
68
+ throw new \InvalidArgumentException(sprintf('Package type "%s" is not supported', $type));
69
+ }
70
+
71
+ return $this->templatePath($locations[$packageType], $availableVars);
72
+ }
73
+
74
+ /**
75
+ * For an installer to override to modify the vars per installer.
76
+ *
77
+ * @param array $vars
78
+ * @return array
79
+ */
80
+ public function inflectPackageVars($vars)
81
+ {
82
+ return $vars;
83
+ }
84
+
85
+ /**
86
+ * Gets the installer's locations
87
+ *
88
+ * @return array
89
+ */
90
+ public function getLocations()
91
+ {
92
+ return $this->locations;
93
+ }
94
+
95
+ /**
96
+ * Replace vars in a path
97
+ *
98
+ * @param string $path
99
+ * @param array $vars
100
+ * @return string
101
+ */
102
+ protected function templatePath($path, array $vars = array())
103
+ {
104
+ if (strpos($path, '{') !== false) {
105
+ extract($vars);
106
+ preg_match_all('@\{\$([A-Za-z0-9_]*)\}@i', $path, $matches);
107
+ if (!empty($matches[1])) {
108
+ foreach ($matches[1] as $var) {
109
+ $path = str_replace('{$' . $var . '}', $$var, $path);
110
+ }
111
+ }
112
+ }
113
+
114
+ return $path;
115
+ }
116
+
117
+ /**
118
+ * Search through a passed paths array for a custom install path.
119
+ *
120
+ * @param array $paths
121
+ * @param string $name
122
+ * @param string $type
123
+ * @return string
124
+ */
125
+ protected function mapCustomInstallPaths(array $paths, $name, $type)
126
+ {
127
+ foreach ($paths as $path => $names) {
128
+ if (in_array($name, $names) || in_array('type:' . $type, $names)) {
129
+ return $path;
130
+ }
131
+ }
132
+
133
+ return false;
134
+ }
135
+ }
vendor/composer/installers/src/Composer/Installers/BitrixInstaller.php ADDED
@@ -0,0 +1,89 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ namespace Composer\Installers;
3
+
4
+ use Composer\Util\Filesystem;
5
+
6
+ /**
7
+ * Installer for Bitrix Framework
8
+ *
9
+ * @author Nik Samokhvalov <nik@samokhvalov.info>
10
+ * @author Denis Kulichkin <onexhovia@gmail.com>
11
+ */
12
+ class BitrixInstaller extends BaseInstaller
13
+ {
14
+ protected $locations = array(
15
+ 'module' => 'bitrix/modules/{$name}/',
16
+ 'component' => 'bitrix/components/{$name}/',
17
+ 'theme' => 'bitrix/templates/{$name}/',
18
+ );
19
+
20
+ /**
21
+ * @var array Storage for informations about duplicates at all the time of installation packages
22
+ */
23
+ private static $checkedDuplicates = array();
24
+
25
+ /**
26
+ * {@inheritdoc}
27
+ */
28
+ protected function templatePath($path, array $vars = array())
29
+ {
30
+ $templatePath = parent::templatePath($path, $vars);
31
+ $this->checkDuplicates($templatePath, $vars);
32
+
33
+ return $templatePath;
34
+ }
35
+
36
+ /**
37
+ * Duplicates search packages
38
+ *
39
+ * @param string $templatePath
40
+ * @param array $vars
41
+ */
42
+ protected function checkDuplicates($templatePath, array $vars = array())
43
+ {
44
+ /**
45
+ * Incorrect paths for backward compatibility
46
+ */
47
+ $oldLocations = array(
48
+ 'module' => 'local/modules/{$name}/',
49
+ 'component' => 'local/components/{$name}/',
50
+ 'theme' => 'local/templates/{$name}/'
51
+ );
52
+
53
+ $packageType = substr($vars['type'], strlen('bitrix') + 1);
54
+ $oldLocation = str_replace('{$name}', $vars['name'], $oldLocations[$packageType]);
55
+
56
+ if (in_array($oldLocation, static::$checkedDuplicates)) {
57
+ return;
58
+ }
59
+
60
+ if ($oldLocation !== $templatePath && file_exists($oldLocation) && $this->io && $this->io->isInteractive()) {
61
+
62
+ $this->io->writeError(' <error>Duplication of packages:</error>');
63
+ $this->io->writeError(' <info>Package ' . $oldLocation . ' will be called instead package ' . $templatePath . '</info>');
64
+
65
+ while (true) {
66
+ switch ($this->io->ask(' <info>Delete ' . $oldLocation . ' [y,n,?]?</info> ', '?')) {
67
+ case 'y':
68
+ $fs = new Filesystem();
69
+ $fs->removeDirectory($oldLocation);
70
+ break 2;
71
+
72
+ case 'n':
73
+ break 2;
74
+
75
+ case '?':
76
+ default:
77
+ $this->io->writeError(array(
78
+ ' y - delete package ' . $oldLocation . ' and to continue with the installation',
79
+ ' n - don\'t delete and to continue with the installation',
80
+ ));
81
+ $this->io->writeError(' ? - print help');
82
+ break;
83
+ }
84
+ }
85
+ }
86
+
87
+ static::$checkedDuplicates[] = $oldLocation;
88
+ }
89
+ }
vendor/composer/installers/src/Composer/Installers/BonefishInstaller.php ADDED
@@ -0,0 +1,9 @@
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ namespace Composer\Installers;
3
+
4
+ class BonefishInstaller extends BaseInstaller
5
+ {
6
+ protected $locations = array(
7
+ 'package' => 'Packages/{$vendor}/{$name}/'
8
+ );
9
+ }
vendor/composer/installers/src/Composer/Installers/CakePHPInstaller.php ADDED
@@ -0,0 +1,84 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ namespace Composer\Installers;
3
+
4
+ use Composer\DependencyResolver\Pool;
5
+ use Composer\Package\PackageInterface;
6
+
7
+ class CakePHPInstaller extends BaseInstaller
8
+ {
9
+ protected $locations = array(
10
+ 'plugin' => 'Plugin/{$name}/',
11
+ );
12
+
13
+ /**
14
+ * Format package name to CamelCase
15
+ */
16
+ public function inflectPackageVars($vars)
17
+ {
18
+ if ($this->matchesCakeVersion('>=', '3.0.0')) {
19
+ return $vars;
20
+ }
21
+
22
+ $nameParts = explode('/', $vars['name']);
23
+ foreach ($nameParts as &$value) {
24
+ $value = strtolower(preg_replace('/(?<=\\w)([A-Z])/', '_\\1', $value));
25
+ $value = str_replace(array('-', '_'), ' ', $value);
26
+ $value = str_replace(' ', '', ucwords($value));
27
+ }
28
+ $vars['name'] = implode('/', $nameParts);
29
+
30
+ return $vars;
31
+ }
32
+
33
+ /**
34
+ * Change the default plugin location when cakephp >= 3.0
35
+ */
36
+ public function getLocations()
37
+ {
38
+ if ($this->matchesCakeVersion('>=', '3.0.0')) {
39
+ $this->locations['plugin'] = $this->composer->getConfig()->get('vendor-dir') . '/{$vendor}/{$name}/';
40
+ }
41
+ return $this->locations;
42
+ }
43
+
44
+ /**
45
+ * Check if CakePHP version matches against a version
46
+ *
47
+ * @param string $matcher
48
+ * @param string $version
49
+ * @return bool
50
+ */
51
+ protected function matchesCakeVersion($matcher, $version)
52
+ {
53
+ if (class_exists('Composer\Semver\Constraint\MultiConstraint')) {
54
+ $multiClass = 'Composer\Semver\Constraint\MultiConstraint';
55
+ $constraintClass = 'Composer\Semver\Constraint\Constraint';
56
+ } else {
57
+ $multiClass = 'Composer\Package\LinkConstraint\MultiConstraint';
58
+ $constraintClass = 'Composer\Package\LinkConstraint\VersionConstraint';
59
+ }
60
+
61
+ $repositoryManager = $this->composer->getRepositoryManager();
62
+ if ($repositoryManager) {
63
+ $repos = $repositoryManager->getLocalRepository();
64
+ if (!$repos) {
65
+ return false;
66
+ }
67
+ $cake3 = new $multiClass(array(
68
+ new $constraintClass($matcher, $version),
69
+ new $constraintClass('!=', '9999999-dev'),
70
+ ));
71
+ $pool = new Pool('dev');
72
+ $pool->addRepository($repos);
73
+ $packages = $pool->whatProvides('cakephp/cakephp');
74
+ foreach ($packages as $package) {
75
+ $installed = new $constraintClass('=', $package->getVersion());
76
+ if ($cake3->matches($installed)) {
77
+ return true;
78
+ break;
79
+ }
80
+ }
81
+ }
82
+ return false;
83
+ }
84
+ }
vendor/composer/installers/src/Composer/Installers/ChefInstaller.php ADDED
@@ -0,0 +1,11 @@
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ namespace Composer\Installers;
3
+
4
+ class ChefInstaller extends BaseInstaller
5
+ {
6
+ protected $locations = array(
7
+ 'cookbook' => 'Chef/{$vendor}/{$name}/',
8
+ 'role' => 'Chef/roles/{$name}/',
9
+ );
10
+ }
11
+
vendor/composer/installers/src/Composer/Installers/ClanCatsFrameworkInstaller.php ADDED
@@ -0,0 +1,10 @@
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ namespace Composer\Installers;
3
+
4
+ class ClanCatsFrameworkInstaller extends BaseInstaller
5
+ {
6
+ protected $locations = array(
7
+ 'ship' => 'CCF/orbit/{$name}/',
8
+ 'theme' => 'CCF/app/themes/{$name}/',
9
+ );
10
+ }
vendor/composer/installers/src/Composer/Installers/CodeIgniterInstaller.php ADDED
@@ -0,0 +1,11 @@
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ namespace Composer\Installers;
3
+
4
+ class CodeIgniterInstaller extends BaseInstaller
5
+ {
6
+ protected $locations = array(
7
+ 'library' => 'application/libraries/{$name}/',
8
+ 'third-party' => 'application/third_party/{$name}/',
9
+ 'module' => 'application/modules/{$name}/',
10
+ );
11
+ }
vendor/composer/installers/src/Composer/Installers/Concrete5Installer.php ADDED
@@ -0,0 +1,12 @@
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ namespace Composer\Installers;
3
+
4
+ class Concrete5Installer extends BaseInstaller
5
+ {
6
+ protected $locations = array(
7
+ 'block' => 'blocks/{$name}/',
8
+ 'package' => 'packages/{$name}/',
9
+ 'theme' => 'themes/{$name}/',
10
+ 'update' => 'updates/{$name}/',
11
+ );
12
+ }
vendor/composer/installers/src/Composer/Installers/CraftInstaller.php ADDED
@@ -0,0 +1,35 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ namespace Composer\Installers;
3
+
4
+ /**
5
+ * Installer for Craft Plugins
6
+ */
7
+ class CraftInstaller extends BaseInstaller
8
+ {
9
+ const NAME_PREFIX = 'craft';
10
+ const NAME_SUFFIX = 'plugin';
11
+
12
+ protected $locations = array(
13
+ 'plugin' => 'craft/plugins/{$name}/',
14
+ );
15
+
16
+ /**
17
+ * Strip `craft-` prefix and/or `-plugin` suffix from package names
18
+ *
19
+ * @param array $vars
20
+ *
21
+ * @return array
22
+ */
23
+ final public function inflectPackageVars($vars)
24
+ {
25
+ return $this->inflectPluginVars($vars);
26
+ }
27
+
28
+ private function inflectPluginVars($vars)
29
+ {
30
+ $vars['name'] = preg_replace('/-' . self::NAME_SUFFIX . '$/i', '', $vars['name']);
31
+ $vars['name'] = preg_replace('/^' . self::NAME_PREFIX . '-/i', '', $vars['name']);
32
+
33
+ return $vars;
34
+ }
35
+ }
vendor/composer/installers/src/Composer/Installers/CroogoInstaller.php ADDED
@@ -0,0 +1,21 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ namespace Composer\Installers;
3
+
4
+ class CroogoInstaller extends BaseInstaller
5
+ {
6
+ protected $locations = array(
7
+ 'plugin' => 'Plugin/{$name}/',
8
+ 'theme' => 'View/Themed/{$name}/',
9
+ );
10
+
11
+ /**
12
+ * Format package name to CamelCase
13
+ */
14
+ public function inflectPackageVars($vars)
15
+ {
16
+ $vars['name'] = strtolower(str_replace(array('-', '_'), ' ', $vars['name']));
17
+ $vars['name'] = str_replace(' ', '', ucwords($vars['name']));
18
+
19
+ return $vars;
20
+ }
21
+ }
vendor/composer/installers/src/Composer/Installers/DokuWikiInstaller.php ADDED
@@ -0,0 +1,50 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ namespace Composer\Installers;
3
+
4
+ class DokuWikiInstaller extends BaseInstaller
5
+ {
6
+ protected $locations = array(
7
+ 'plugin' => 'lib/plugins/{$name}/',
8
+ 'template' => 'lib/tpl/{$name}/',
9
+ );
10
+
11
+ /**
12
+ * Format package name.
13
+ *
14
+ * For package type dokuwiki-plugin, cut off a trailing '-plugin',
15
+ * or leading dokuwiki_ if present.
16
+ *
17
+ * For package type dokuwiki-template, cut off a trailing '-template' if present.
18
+ *
19
+ */
20
+ public function inflectPackageVars($vars)
21
+ {
22
+
23
+ if ($vars['type'] === 'dokuwiki-plugin') {
24
+ return $this->inflectPluginVars($vars);
25
+ }
26
+
27
+ if ($vars['type'] === 'dokuwiki-template') {
28
+ return $this->inflectTemplateVars($vars);
29
+ }
30
+
31
+ return $vars;
32
+ }
33
+
34
+ protected function inflectPluginVars($vars)
35
+ {
36
+ $vars['name'] = preg_replace('/-plugin$/', '', $vars['name']);
37
+ $vars['name'] = preg_replace('/^dokuwiki_?-?/', '', $vars['name']);
38
+
39
+ return $vars;
40
+ }
41
+
42
+ protected function inflectTemplateVars($vars)
43
+ {
44
+ $vars['name'] = preg_replace('/-template$/', '', $vars['name']);
45
+ $vars['name'] = preg_replace('/^dokuwiki_?-?/', '', $vars['name']);
46
+
47
+ return $vars;
48
+ }
49
+
50
+ }
vendor/composer/installers/src/Composer/Installers/DolibarrInstaller.php ADDED
@@ -0,0 +1,16 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ namespace Composer\Installers;
3
+
4
+ /**
5
+ * Class DolibarrInstaller
6
+ *
7
+ * @package Composer\Installers
8
+ * @author Raphaël Doursenaud <rdoursenaud@gpcsolutions.fr>
9
+ */
10
+ class DolibarrInstaller extends BaseInstaller
11
+ {
12
+ //TODO: Add support for scripts and themes
13
+ protected $locations = array(
14
+ 'module' => 'htdocs/custom/{$name}/',
15
+ );
16
+ }
vendor/composer/installers/src/Composer/Installers/DrupalInstaller.php ADDED
@@ -0,0 +1,14 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ namespace Composer\Installers;
3
+
4
+ class DrupalInstaller extends BaseInstaller
5
+ {
6
+ protected $locations = array(
7
+ 'core' => 'core/',
8
+ 'module' => 'modules/{$name}/',
9
+ 'theme' => 'themes/{$name}/',
10
+ 'library' => 'libraries/{$name}/',
11
+ 'profile' => 'profiles/{$name}/',
12
+ 'drush' => 'drush/{$name}/',
13
+ );
14
+ }
vendor/composer/installers/src/Composer/Installers/ElggInstaller.php ADDED
@@ -0,0 +1,9 @@
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ namespace Composer\Installers;
3
+
4
+ class ElggInstaller extends BaseInstaller
5
+ {
6
+ protected $locations = array(
7
+ 'plugin' => 'mod/{$name}/',
8
+ );
9
+ }
vendor/composer/installers/src/Composer/Installers/FuelInstaller.php ADDED
@@ -0,0 +1,11 @@
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ namespace Composer\Installers;
3
+
4
+ class FuelInstaller extends BaseInstaller
5
+ {
6
+ protected $locations = array(
7
+ 'module' => 'fuel/app/modules/{$name}/',
8
+ 'package' => 'fuel/packages/{$name}/',
9
+ 'theme' => 'fuel/app/themes/{$name}/',
10
+ );
11
+ }
vendor/composer/installers/src/Composer/Installers/FuelphpInstaller.php ADDED
@@ -0,0 +1,9 @@
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ namespace Composer\Installers;
3
+
4
+ class FuelphpInstaller extends BaseInstaller
5
+ {
6
+ protected $locations = array(
7
+ 'component' => 'components/{$name}/',
8
+ );
9
+ }
vendor/composer/installers/src/Composer/Installers/GravInstaller.php ADDED
@@ -0,0 +1,30 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ namespace Composer\Installers;
3
+
4
+ class GravInstaller extends BaseInstaller
5
+ {
6
+ protected $locations = array(
7
+ 'plugin' => 'user/plugins/{$name}/',
8
+ 'theme' => 'user/themes/{$name}/',
9
+ );
10
+
11
+ /**
12
+ * Format package name
13
+ *
14
+ * @param array $vars
15
+ *
16
+ * @return array
17
+ */
18
+ public function inflectPackageVars($vars)
19
+ {
20
+ $restrictedWords = implode('|', array_keys($this->locations));
21
+
22
+ $vars['name'] = strtolower($vars['name']);
23
+ $vars['name'] = preg_replace('/^(?:grav-)?(?:(?:'.$restrictedWords.')-)?(.*?)(?:-(?:'.$restrictedWords.'))?$/ui',
24
+ '$1',
25
+ $vars['name']
26
+ );
27
+
28
+ return $vars;
29
+ }
30
+ }
vendor/composer/installers/src/Composer/Installers/HuradInstaller.php ADDED
@@ -0,0 +1,25 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ namespace Composer\Installers;
3
+
4
+ class HuradInstaller extends BaseInstaller
5
+ {
6
+ protected $locations = array(
7
+ 'plugin' => 'plugins/{$name}/',
8
+ 'theme' => 'plugins/{$name}/',
9
+ );
10
+
11
+ /**
12
+ * Format package name to CamelCase
13
+ */
14
+ public function inflectPackageVars($vars)
15
+ {
16
+ $nameParts = explode('/', $vars['name']);
17
+ foreach ($nameParts as &$value) {
18
+ $value = strtolower(preg_replace('/(?<=\\w)([A-Z])/', '_\\1', $value));
19
+ $value = str_replace(array('-', '_'), ' ', $value);
20
+ $value = str_replace(' ', '', ucwords($value));
21
+ }
22
+ $vars['name'] = implode('/', $nameParts);
23
+ return $vars;
24
+ }
25
+ }
vendor/composer/installers/src/Composer/Installers/Installer.php ADDED
@@ -0,0 +1,176 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ namespace Composer\Installers;
3
+
4
+ use Composer\IO\IOInterface;
5
+ use Composer\Installer\LibraryInstaller;
6
+ use Composer\Package\PackageInterface;
7
+ use Composer\Repository\InstalledRepositoryInterface;
8
+
9
+ class Installer extends LibraryInstaller
10
+ {
11
+ /**
12
+ * Package types to installer class map
13
+ *
14
+ * @var array
15
+ */
16
+ private $supportedTypes = array(
17
+ 'aimeos' => 'AimeosInstaller',
18
+ 'asgard' => 'AsgardInstaller',
19
+ 'agl' => 'AglInstaller',
20
+ 'annotatecms' => 'AnnotateCmsInstaller',
21
+ 'bitrix' => 'BitrixInstaller',
22
+ 'bonefish' => 'BonefishInstaller',
23
+ 'cakephp' => 'CakePHPInstaller',
24
+ 'chef' => 'ChefInstaller',
25
+ 'ccframework' => 'ClanCatsFrameworkInstaller',
26
+ 'codeigniter' => 'CodeIgniterInstaller',
27
+ 'concrete5' => 'Concrete5Installer',
28
+ 'craft' => 'CraftInstaller',
29
+ 'croogo' => 'CroogoInstaller',
30
+ 'dokuwiki' => 'DokuWikiInstaller',
31
+ 'dolibarr' => 'DolibarrInstaller',
32
+ 'drupal' => 'DrupalInstaller',
33
+ 'elgg' => 'ElggInstaller',
34
+ 'fuel' => 'FuelInstaller',
35
+ 'fuelphp' => 'FuelphpInstaller',
36
+ 'grav' => 'GravInstaller',
37
+ 'hurad' => 'HuradInstaller',
38
+ 'joomla' => 'JoomlaInstaller',
39
+ 'kirby' => 'KirbyInstaller',
40
+ 'kodicms' => 'KodiCMSInstaller',
41
+ 'kohana' => 'KohanaInstaller',
42
+ 'laravel' => 'LaravelInstaller',
43
+ 'lithium' => 'LithiumInstaller',
44
+ 'magento' => 'MagentoInstaller',
45
+ 'mako' => 'MakoInstaller',
46
+ 'mediawiki' => 'MediaWikiInstaller',
47
+ 'microweber' => 'MicroweberInstaller',
48
+ 'modulework' => 'MODULEWorkInstaller',
49
+ 'modxevo' => 'MODXEvoInstaller',
50
+ 'moodle' => 'MoodleInstaller',
51
+ 'october' => 'OctoberInstaller',
52
+ 'oxid' => 'OxidInstaller',
53
+ 'phpbb' => 'PhpBBInstaller',
54
+ 'pimcore' => 'PimcoreInstaller',
55
+ 'piwik' => 'PiwikInstaller',
56
+ 'ppi' => 'PPIInstaller',
57
+ 'puppet' => 'PuppetInstaller',
58
+ 'redaxo' => 'RedaxoInstaller',
59
+ 'roundcube' => 'RoundcubeInstaller',
60
+ 'shopware' => 'ShopwareInstaller',
61
+ 'silverstripe' => 'SilverStripeInstaller',
62
+ 'smf' => 'SMFInstaller',
63
+ 'symfony1' => 'Symfony1Installer',
64
+ 'thelia' => 'TheliaInstaller',
65
+ 'tusk' => 'TuskInstaller',
66
+ 'typo3-cms' => 'TYPO3CmsInstaller',
67
+ 'typo3-flow' => 'TYPO3FlowInstaller',
68
+ 'whmcs' => 'WHMCSInstaller',
69
+ 'wolfcms' => 'WolfCMSInstaller',
70
+ 'wordpress' => 'WordPressInstaller',
71
+ 'zend' => 'ZendInstaller',
72
+ 'zikula' => 'ZikulaInstaller',
73
+ 'prestashop' => 'PrestashopInstaller'
74
+ );
75
+
76
+ /**
77
+ * {@inheritDoc}
78
+ */
79
+ public function getInstallPath(PackageInterface $package)
80
+ {
81
+ $type = $package->getType();
82
+ $frameworkType = $this->findFrameworkType($type);
83
+
84
+ if ($frameworkType === false) {
85
+ throw new \InvalidArgumentException(
86
+ 'Sorry the package type of this package is not yet supported.'
87
+ );
88
+ }
89
+
90
+ $class = 'Composer\\Installers\\' . $this->supportedTypes[$frameworkType];
91
+ $installer = new $class($package, $this->composer, $this->getIO());
92
+
93
+ return $installer->getInstallPath($package, $frameworkType);
94
+ }
95
+
96
+ public function uninstall(InstalledRepositoryInterface $repo, PackageInterface $package)
97
+ {
98
+ if (!$repo->hasPackage($package)) {
99
+ throw new \InvalidArgumentException('Package is not installed: '.$package);
100
+ }
101
+
102
+ $repo->removePackage($package);
103
+
104
+ $installPath = $this->getInstallPath($package);
105
+ $this->io->write(sprintf('Deleting %s - %s', $installPath, $this->filesystem->removeDirectory($installPath) ? '<comment>deleted</comment>' : '<error>not deleted</error>'));
106
+ }
107
+
108
+ /**
109
+ * {@inheritDoc}
110
+ */
111
+ public function supports($packageType)
112
+ {
113
+ $frameworkType = $this->findFrameworkType($packageType);
114
+
115
+ if ($frameworkType === false) {
116
+ return false;
117
+ }
118
+
119
+ $locationPattern = $this->getLocationPattern($frameworkType);
120
+
121
+ return preg_match('#' . $frameworkType . '-' . $locationPattern . '#', $packageType, $matches) === 1;
122
+ }
123
+
124
+ /**
125
+ * Finds a supported framework type if it exists and returns it
126
+ *
127
+ * @param string $type
128
+ * @return string
129
+ */
130
+ protected function findFrameworkType($type)
131
+ {
132
+ $frameworkType = false;
133
+
134
+ krsort($this->supportedTypes);
135
+
136
+ foreach ($this->supportedTypes as $key => $val) {
137
+ if ($key === substr($type, 0, strlen($key))) {
138
+ $frameworkType = substr($type, 0, strlen($key));
139
+ break;
140
+ }
141
+ }
142
+
143
+ return $frameworkType;
144
+ }
145
+
146
+ /**
147
+ * Get the second part of the regular expression to check for support of a
148
+ * package type
149
+ *
150
+ * @param string $frameworkType
151
+ * @return string
152
+ */
153
+ protected function getLocationPattern($frameworkType)
154
+ {
155
+ $pattern = false;
156
+ if (!empty($this->supportedTypes[$frameworkType])) {
157
+ $frameworkClass = 'Composer\\Installers\\' . $this->supportedTypes[$frameworkType];
158
+ /** @var BaseInstaller $framework */
159
+ $framework = new $frameworkClass(null, $this->composer, $this->getIO());
160
+ $locations = array_keys($framework->getLocations());
161
+ $pattern = $locations ? '(' . implode('|', $locations) . ')' : false;
162
+ }
163
+
164
+ return $pattern ? : '(\w+)';
165
+ }
166
+
167
+ /**
168
+ * Get I/O object
169
+ *
170
+ * @return IOInterface
171
+ */
172
+ private function getIO()
173
+ {
174
+ return $this->io;
175
+ }
176
+ }
vendor/composer/installers/src/Composer/Installers/JoomlaInstaller.php ADDED
@@ -0,0 +1,15 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ namespace Composer\Installers;
3
+
4
+ class JoomlaInstaller extends BaseInstaller
5
+ {
6
+ protected $locations = array(
7
+ 'component' => 'components/{$name}/',
8
+ 'module' => 'modules/{$name}/',
9
+ 'template' => 'templates/{$name}/',
10
+ 'plugin' => 'plugins/{$name}/',
11
+ 'library' => 'libraries/{$name}/',
12
+ );
13
+
14
+ // TODO: Add inflector for mod_ and com_ names
15
+ }
vendor/composer/installers/src/Composer/Installers/KirbyInstaller.php ADDED
@@ -0,0 +1,9 @@
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ namespace Composer\Installers;
3
+
4
+ class KirbyInstaller extends BaseInstaller
5
+ {
6
+ protected $locations = array(
7
+ 'plugin' => 'site/plugins/{$name}/',
8
+ );
9
+ }
vendor/composer/installers/src/Composer/Installers/KodiCMSInstaller.php ADDED
@@ -0,0 +1,10 @@
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ namespace Composer\Installers;
3
+
4
+ class KodiCMSInstaller extends BaseInstaller
5
+ {
6
+ protected $locations = array(
7
+ 'plugin' => 'cms/plugins/{$name}/',
8
+ 'media' => 'cms/media/vendor/{$name}/'
9
+ );
10
+ }
vendor/composer/installers/src/Composer/Installers/KohanaInstaller.php ADDED
@@ -0,0 +1,9 @@
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ namespace Composer\Installers;
3
+
4
+ class KohanaInstaller extends BaseInstaller
5
+ {
6
+ protected $locations = array(
7
+ 'module' => 'modules/{$name}/',
8
+ );
9
+ }
vendor/composer/installers/src/Composer/Installers/LaravelInstaller.php ADDED
@@ -0,0 +1,9 @@
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ namespace Composer\Installers;
3
+
4
+ class LaravelInstaller extends BaseInstaller
5
+ {
6
+ protected $locations = array(
7
+ 'library' => 'libraries/{$name}/',
8
+ );
9
+ }
vendor/composer/installers/src/Composer/Installers/LithiumInstaller.php ADDED
@@ -0,0 +1,10 @@
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ namespace Composer\Installers;
3
+
4
+ class LithiumInstaller extends BaseInstaller
5
+ {
6
+ protected $locations = array(
7
+ 'library' => 'libraries/{$name}/',
8
+ 'source' => 'libraries/_source/{$name}/',
9
+ );
10
+ }
vendor/composer/installers/src/Composer/Installers/MODULEWorkInstaller.php ADDED
@@ -0,0 +1,9 @@
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ namespace Composer\Installers;
3
+
4
+ class MODULEWorkInstaller extends BaseInstaller
5
+ {
6
+ protected $locations = array(
7
+ 'module' => 'modules/{$name}/',
8
+ );
9
+ }
vendor/composer/installers/src/Composer/Installers/MODXEvoInstaller.php ADDED
@@ -0,0 +1,16 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ namespace Composer\Installers;
3
+
4
+ /**
5
+ * An installer to handle MODX Evolution specifics when installing packages.
6
+ */
7
+ class MODXEvoInstaller extends BaseInstaller
8
+ {
9
+ protected $locations = array(
10
+ 'snippet' => 'assets/snippets/{$name}/',
11
+ 'plugin' => 'assets/plugins/{$name}/',
12
+ 'module' => 'assets/modules/{$name}/',
13
+ 'template' => 'assets/templates/{$name}/',
14
+ 'lib' => 'assets/lib/{$name}/'
15
+ );
16
+ }
vendor/composer/installers/src/Composer/Installers/MagentoInstaller.php ADDED
@@ -0,0 +1,11 @@
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ namespace Composer\Installers;
3
+
4
+ class MagentoInstaller extends BaseInstaller
5
+ {
6
+ protected $locations = array(
7
+ 'theme' => 'app/design/frontend/{$name}/',
8
+ 'skin' => 'skin/frontend/default/{$name}/',
9
+ 'library' => 'lib/{$name}/',
10
+ );
11
+ }
vendor/composer/installers/src/Composer/Installers/MakoInstaller.php ADDED
@@ -0,0 +1,9 @@
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ namespace Composer\Installers;
3
+
4
+ class MakoInstaller extends BaseInstaller
5
+ {
6
+ protected $locations = array(
7
+ 'package' => 'app/packages/{$name}/',
8
+ );
9
+ }
vendor/composer/installers/src/Composer/Installers/MediaWikiInstaller.php ADDED
@@ -0,0 +1,50 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ namespace Composer\Installers;
3
+
4
+ class MediaWikiInstaller extends BaseInstaller
5
+ {
6
+ protected $locations = array(
7
+ 'extension' => 'extensions/{$name}/',
8
+ 'skin' => 'skins/{$name}/',
9
+ );
10
+
11
+ /**
12
+ * Format package name.
13
+ *
14
+ * For package type mediawiki-extension, cut off a trailing '-extension' if present and transform
15
+ * to CamelCase keeping existing uppercase chars.
16
+ *
17
+ * For package type mediawiki-skin, cut off a trailing '-skin' if present.
18
+ *
19
+ */
20
+ public function inflectPackageVars($vars)
21
+ {
22
+
23
+ if ($vars['type'] === 'mediawiki-extension') {
24
+ return $this->inflectExtensionVars($vars);
25
+ }
26
+
27
+ if ($vars['type'] === 'mediawiki-skin') {
28
+ return $this->inflectSkinVars($vars);
29
+ }
30
+
31
+ return $vars;
32
+ }
33
+
34
+ protected function inflectExtensionVars($vars)
35
+ {
36
+ $vars['name'] = preg_replace('/-extension$/', '', $vars['name']);
37
+ $vars['name'] = str_replace('-', ' ', $vars['name']);
38
+ $vars['name'] = str_replace(' ', '', ucwords($vars['name']));
39
+
40
+ return $vars;
41
+ }
42
+
43
+ protected function inflectSkinVars($vars)
44
+ {
45
+ $vars['name'] = preg_replace('/-skin$/', '', $vars['name']);
46
+
47
+ return $vars;
48
+ }
49
+
50
+ }
vendor/composer/installers/src/Composer/Installers/MicroweberInstaller.php ADDED
@@ -0,0 +1,111 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ namespace Composer\Installers;
3
+
4
+ class MicroweberInstaller extends BaseInstaller
5
+ {
6
+ protected $locations = array(
7
+ 'module' => 'userfiles/modules/{$name}/',
8
+ 'module-skin' => 'userfiles/modules/{$name}/templates/',
9
+ 'template' => 'userfiles/templates/{$name}/',
10
+ 'element' => 'userfiles/elements/{$name}/',
11
+ 'vendor' => 'vendor/{$name}/',
12
+ 'components' => 'components/{$name}/'
13
+ );
14
+
15
+ /**
16
+ * Format package name.
17
+ *
18
+ * For package type microweber-module, cut off a trailing '-module' if present
19
+ *
20
+ * For package type microweber-template, cut off a trailing '-template' if present.
21
+ *
22
+ */
23
+ public function inflectPackageVars($vars)
24
+ {
25
+ if ($vars['type'] === 'microweber-template') {
26
+ return $this->inflectTemplateVars($vars);
27
+ }
28
+ if ($vars['type'] === 'microweber-templates') {
29
+ return $this->inflectTemplatesVars($vars);
30
+ }
31
+ if ($vars['type'] === 'microweber-core') {
32
+ return $this->inflectCoreVars($vars);
33
+ }
34
+ if ($vars['type'] === 'microweber-adapter') {
35
+ return $this->inflectCoreVars($vars);
36
+ }
37
+ if ($vars['type'] === 'microweber-module') {
38
+ return $this->inflectModuleVars($vars);
39
+ }
40
+ if ($vars['type'] === 'microweber-modules') {
41
+ return $this->inflectModulesVars($vars);
42
+ }
43
+ if ($vars['type'] === 'microweber-skin') {
44
+ return $this->inflectSkinVars($vars);
45
+ }
46
+ if ($vars['type'] === 'microweber-element' or $vars['type'] === 'microweber-elements') {
47
+ return $this->inflectElementVars($vars);
48
+ }
49
+
50
+ return $vars;
51
+ }
52
+
53
+ protected function inflectTemplateVars($vars)
54
+ {
55
+ $vars['name'] = preg_replace('/-template$/', '', $vars['name']);
56
+ $vars['name'] = preg_replace('/template-$/', '', $vars['name']);
57
+
58
+ return $vars;
59
+ }
60
+
61
+ protected function inflectTemplatesVars($vars)
62
+ {
63
+ $vars['name'] = preg_replace('/-templates$/', '', $vars['name']);
64
+ $vars['name'] = preg_replace('/templates-$/', '', $vars['name']);
65
+
66
+ return $vars;
67
+ }
68
+
69
+ protected function inflectCoreVars($vars)
70
+ {
71
+ $vars['name'] = preg_replace('/-providers$/', '', $vars['name']);
72
+ $vars['name'] = preg_replace('/-provider$/', '', $vars['name']);
73
+ $vars['name'] = preg_replace('/-adapter$/', '', $vars['name']);
74
+
75
+ return $vars;
76
+ }
77
+
78
+ protected function inflectModuleVars($vars)
79
+ {
80
+ $vars['name'] = preg_replace('/-module$/', '', $vars['name']);
81
+ $vars['name'] = preg_replace('/module-$/', '', $vars['name']);
82
+
83
+ return $vars;
84
+ }
85
+
86
+ protected function inflectModulesVars($vars)
87
+ {
88
+ $vars['name'] = preg_replace('/-modules$/', '', $vars['name']);
89
+ $vars['name'] = preg_replace('/modules-$/', '', $vars['name']);
90
+
91
+ return $vars;
92
+ }
93
+
94
+ protected function inflectSkinVars($vars)
95
+ {
96
+ $vars['name'] = preg_replace('/-skin$/', '', $vars['name']);
97
+ $vars['name'] = preg_replace('/skin-$/', '', $vars['name']);
98
+
99
+ return $vars;
100
+ }
101
+
102
+ protected function inflectElementVars($vars)
103
+ {
104
+ $vars['name'] = preg_replace('/-elements$/', '', $vars['name']);
105
+ $vars['name'] = preg_replace('/elements-$/', '', $vars['name']);
106
+ $vars['name'] = preg_replace('/-element$/', '', $vars['name']);
107
+ $vars['name'] = preg_replace('/element-$/', '', $vars['name']);
108
+
109
+ return $vars;
110
+ }
111
+ }
vendor/composer/installers/src/Composer/Installers/MoodleInstaller.php ADDED
@@ -0,0 +1,56 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ namespace Composer\Installers;
3
+
4
+ class MoodleInstaller extends BaseInstaller
5
+ {
6
+ protected $locations = array(
7
+ 'mod' => 'mod/{$name}/',
8
+ 'admin_report' => 'admin/report/{$name}/',
9
+ 'atto' => 'lib/editor/atto/plugins/{$name}/',
10
+ 'tool' => 'admin/tool/{$name}/',
11
+ 'assignment' => 'mod/assignment/type/{$name}/',
12
+ 'assignsubmission' => 'mod/assign/submission/{$name}/',
13
+ 'assignfeedback' => 'mod/assign/feedback/{$name}/',
14
+ 'auth' => 'auth/{$name}/',
15
+ 'availability' => 'availability/condition/{$name}/',
16
+ 'block' => 'blocks/{$name}/',
17
+ 'booktool' => 'mod/book/tool/{$name}/',
18
+ 'cachestore' => 'cache/stores/{$name}/',
19
+ 'cachelock' => 'cache/locks/{$name}/',
20
+ 'calendartype' => 'calendar/type/{$name}/',
21
+ 'format' => 'course/format/{$name}/',
22
+ 'coursereport' => 'course/report/{$name}/',
23
+ 'datafield' => 'mod/data/field/{$name}/',
24
+ 'datapreset' => 'mod/data/preset/{$name}/',
25
+ 'editor' => 'lib/editor/{$name}/',
26
+ 'enrol' => 'enrol/{$name}/',
27
+ 'filter' => 'filter/{$name}/',
28
+ 'gradeexport' => 'grade/export/{$name}/',
29
+ 'gradeimport' => 'grade/import/{$name}/',
30
+ 'gradereport' => 'grade/report/{$name}/',
31
+ 'gradingform' => 'grade/grading/form/{$name}/',
32
+ 'local' => 'local/{$name}/',
33
+ 'logstore' => 'admin/tool/log/store/{$name}/',
34
+ 'ltisource' => 'mod/lti/source/{$name}/',
35
+ 'ltiservice' => 'mod/lti/service/{$name}/',
36
+ 'message' => 'message/output/{$name}/',
37
+ 'mnetservice' => 'mnet/service/{$name}/',
38
+ 'plagiarism' => 'plagiarism/{$name}/',
39
+ 'portfolio' => 'portfolio/{$name}/',
40
+ 'qbehaviour' => 'question/behaviour/{$name}/',
41
+ 'qformat' => 'question/format/{$name}/',
42
+ 'qtype' => 'question/type/{$name}/',
43
+ 'quizaccess' => 'mod/quiz/accessrule/{$name}/',
44
+ 'quiz' => 'mod/quiz/report/{$name}/',
45
+ 'report' => 'report/{$name}/',
46
+ 'repository' => 'repository/{$name}/',
47
+ 'scormreport' => 'mod/scorm/report/{$name}/',
48
+ 'theme' => 'theme/{$name}/',
49
+ 'tinymce' => 'lib/editor/tinymce/plugins/{$name}/',
50
+ 'profilefield' => 'user/profile/field/{$name}/',
51
+ 'webservice' => 'webservice/{$name}/',
52
+ 'workshopallocation' => 'mod/workshop/allocation/{$name}/',
53
+ 'workshopeval' => 'mod/workshop/eval/{$name}/',
54
+ 'workshopform' => 'mod/workshop/form/{$name}/'
55
+ );
56
+ }
vendor/composer/installers/src/Composer/Installers/OctoberInstaller.php ADDED
@@ -0,0 +1,46 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ namespace Composer\Installers;
3
+
4
+ class OctoberInstaller extends BaseInstaller
5
+ {
6
+ protected $locations = array(
7
+ 'module' => 'modules/{$name}/',
8
+ 'plugin' => 'plugins/{$vendor}/{$name}/',
9
+ 'theme' => 'themes/{$name}/'
10
+ );
11
+
12
+ /**
13
+ * Format package name.
14
+ *
15
+ * For package type october-plugin, cut off a trailing '-plugin' if present.
16
+ *
17
+ * For package type october-theme, cut off a trailing '-theme' if present.
18
+ *
19
+ */
20
+ public function inflectPackageVars($vars)
21
+ {
22
+ if ($vars['type'] === 'october-plugin') {
23
+ return $this->inflectPluginVars($vars);
24
+ }
25
+
26
+ if ($vars['type'] === 'october-theme') {
27
+ return $this->inflectThemeVars($vars);
28
+ }
29
+
30
+ return $vars;
31
+ }
32
+
33
+ protected function inflectPluginVars($vars)
34
+ {
35
+ $vars['name'] = preg_replace('/-plugin$/', '', $vars['name']);
36
+
37
+ return $vars;
38
+ }
39
+
40
+ protected function inflectThemeVars($vars)
41
+ {
42
+ $vars['name'] = preg_replace('/-theme$/', '', $vars['name']);
43
+
44
+ return $vars;
45
+ }
46
+ }
vendor/composer/installers/src/Composer/Installers/OxidInstaller.php ADDED
@@ -0,0 +1,11 @@
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ namespace Composer\Installers;
3
+
4
+ class OxidInstaller extends BaseInstaller
5
+ {
6
+ protected $locations = array(
7
+ 'module' => 'modules/{$name}/',
8
+ 'theme' => 'application/views/{$name}/',
9
+ 'out' => 'out/{$name}/',
10
+ );
11
+ }
vendor/composer/installers/src/Composer/Installers/PPIInstaller.php ADDED
@@ -0,0 +1,9 @@
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ namespace Composer\Installers;
3
+
4
+ class PPIInstaller extends BaseInstaller
5
+ {
6
+ protected $locations = array(
7
+ 'module' => 'modules/{$name}/',
8
+ );
9
+ }
vendor/composer/installers/src/Composer/Installers/PhpBBInstaller.php ADDED
@@ -0,0 +1,11 @@
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ namespace Composer\Installers;
3
+
4
+ class PhpBBInstaller extends BaseInstaller
5
+ {
6
+ protected $locations = array(
7
+ 'extension' => 'ext/{$vendor}/{$name}/',
8
+ 'language' => 'language/{$name}/',
9
+ 'style' => 'styles/{$name}/',
10
+ );
11
+ }
vendor/composer/installers/src/Composer/Installers/PimcoreInstaller.php ADDED
@@ -0,0 +1,21 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ namespace Composer\Installers;
3
+
4
+ class PimcoreInstaller extends BaseInstaller
5
+ {
6
+ protected $locations = array(
7
+ 'plugin' => 'plugins/{$name}/',
8
+ );
9
+
10
+ /**
11
+ * Format package name to CamelCase
12
+ */
13
+ public function inflectPackageVars($vars)
14
+ {
15
+ $vars['name'] = strtolower(preg_replace('/(?<=\\w)([A-Z])/', '_\\1', $vars['name']));
16
+ $vars['name'] = str_replace(array('-', '_'), ' ', $vars['name']);
17
+ $vars['name'] = str_replace(' ', '', ucwords($vars['name']));
18
+
19
+ return $vars;
20
+ }
21
+ }
vendor/composer/installers/src/Composer/Installers/PiwikInstaller.php ADDED
@@ -0,0 +1,32 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ namespace Composer\Installers;
3
+
4
+ /**
5
+ * Class PiwikInstaller
6
+ *
7
+ * @package Composer\Installers
8
+ */
9
+ class PiwikInstaller extends BaseInstaller
10
+ {
11
+ /**
12
+ * @var array
13
+ */
14
+ protected $locations = array(
15
+ 'plugin' => 'plugins/{$name}/',
16
+ );
17
+
18
+ /**
19
+ * Format package name to CamelCase
20
+ * @param array $vars
21
+ *
22
+ * @return array
23
+ */
24
+ public function inflectPackageVars($vars)
25
+ {
26
+ $vars['name'] = strtolower(preg_replace('/(?<=\\w)([A-Z])/', '_\\1', $vars['name']));
27
+ $vars['name'] = str_replace(array('-', '_'), ' ', $vars['name']);
28
+ $vars['name'] = str_replace(' ', '', ucwords($vars['name']));
29
+
30
+ return $vars;
31
+ }
32
+ }
vendor/composer/installers/src/Composer/Installers/Plugin.php ADDED
@@ -0,0 +1,17 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ namespace Composer\Installers;
4
+
5
+ use Composer\Composer;
6
+ use Composer\IO\IOInterface;
7
+ use Composer\Plugin\PluginInterface;
8
+
9
+ class Plugin implements PluginInterface
10
+ {
11
+
12
+ public function activate(Composer $composer, IOInterface $io)
13
+ {
14
+ $installer = new Installer($io, $composer);
15
+ $composer->getInstallationManager()->addInstaller($installer);
16
+ }
17
+ }
vendor/composer/installers/src/Composer/Installers/PrestashopInstaller.php ADDED
@@ -0,0 +1,10 @@
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ namespace Composer\Installers;
3
+
4
+ class PrestashopInstaller extends BaseInstaller
5
+ {
6
+ protected $locations = array(
7
+ 'module' => 'modules/{$name}/',
8
+ 'theme' => 'themes/{$name}/',
9
+ );
10
+ }
vendor/composer/installers/src/Composer/Installers/PuppetInstaller.php ADDED
@@ -0,0 +1,11 @@
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ namespace Composer\Installers;
4
+
5
+ class PuppetInstaller extends BaseInstaller
6
+ {
7
+
8
+ protected $locations = array(
9
+ 'module' => 'modules/{$name}/',
10
+ );
11
+ }
vendor/composer/installers/src/Composer/Installers/RedaxoInstaller.php ADDED
@@ -0,0 +1,10 @@
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ namespace Composer\Installers;
3
+
4
+ class RedaxoInstaller extends BaseInstaller
5
+ {
6
+ protected $locations = array(
7
+ 'addon' => 'redaxo/include/addons/{$name}/',
8
+ 'bestyle-plugin' => 'redaxo/include/addons/be_style/plugins/{$name}/'
9
+ );
10
+ }
vendor/composer/installers/src/Composer/Installers/RoundcubeInstaller.php ADDED
@@ -0,0 +1,22 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ namespace Composer\Installers;
3
+
4
+ class RoundcubeInstaller extends BaseInstaller
5
+ {
6
+ protected $locations = array(
7
+ 'plugin' => 'plugins/{$name}/',
8
+ );
9
+
10
+ /**
11
+ * Lowercase name and changes the name to a underscores
12
+ *
13
+ * @param array $vars
14
+ * @return array
15
+ */
16
+ public function inflectPackageVars($vars)
17
+ {
18
+ $vars['name'] = strtolower(str_replace('-', '_', $vars['name']));
19
+
20
+ return $vars;
21
+ }
22
+ }
vendor/composer/installers/src/Composer/Installers/SMFInstaller.php ADDED
@@ -0,0 +1,10 @@
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ namespace Composer\Installers;
3
+
4
+ class SMFInstaller extends BaseInstaller
5
+ {
6
+ protected $locations = array(
7
+ 'module' => 'Sources/{$name}/',
8
+ 'theme' => 'Themes/{$name}/',
9
+ );
10
+ }
vendor/composer/installers/src/Composer/Installers/ShopwareInstaller.php ADDED
@@ -0,0 +1,58 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ namespace Composer\Installers;
3
+
4
+ /**
5
+ * Plugin/theme installer for shopware
6
+ * @author Benjamin Boit
7
+ */
8
+ class ShopwareInstaller extends BaseInstaller
9
+ {
10
+ protected $locations = array(
11
+ 'backend-plugin' => 'engine/Shopware/Plugins/Local/Backend/{$name}/',
12
+ 'core-plugin' => 'engine/Shopware/Plugins/Local/Core/{$name}/',
13
+ 'frontend-plugin' => 'engine/Shopware/Plugins/Local/Frontend/{$name}/',
14
+ 'theme' => 'templates/{$name}/'
15
+ );
16
+
17
+ /**
18
+ * Transforms the names
19
+ * @param array $vars
20
+ * @return array
21
+ */
22
+ public function inflectPackageVars($vars)
23
+ {
24
+ if ($vars['type'] === 'shopware-theme') {
25
+ return $this->correctThemeName($vars);
26
+ } else {
27
+ return $this->correctPluginName($vars);
28
+ }
29
+ }
30
+
31
+ /**
32
+ * Changes the name to a camelcased combination of vendor and name
33
+ * @param array $vars
34
+ * @return array
35
+ */
36
+ private function correctPluginName($vars)
37
+ {
38
+ $camelCasedName = preg_replace_callback('/(-[a-z])/', function ($matches) {
39
+ return strtoupper($matches[0][1]);
40
+ }, $vars['name']);
41
+
42
+ $vars['name'] = ucfirst($vars['vendor']) . ucfirst($camelCasedName);
43
+
44
+ return $vars;
45
+ }
46
+
47
+ /**
48
+ * Changes the name to a underscore separated name
49
+ * @param array $vars
50
+ * @return array
51
+ */
52
+ private function correctThemeName($vars)
53
+ {
54
+ $vars['name'] = str_replace('-', '_', $vars['name']);
55
+
56
+ return $vars;
57
+ }
58
+ }
vendor/composer/installers/src/Composer/Installers/SilverStripeInstaller.php ADDED
@@ -0,0 +1,36 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ namespace Composer\Installers;
3
+
4
+ use Composer\Package\PackageInterface;
5
+
6
+ class SilverStripeInstaller extends BaseInstaller
7
+ {
8
+ protected $locations = array(
9
+ 'module' => '{$name}/',
10
+ 'theme' => 'themes/{$name}/',
11
+ );
12
+
13
+ /**
14
+ * Return the install path based on package type.
15
+ *
16
+ * Relies on built-in BaseInstaller behaviour with one exception: silverstripe/framework
17
+ * must be installed to 'sapphire' and not 'framework' if the version is <3.0.0
18
+ *
19
+ * @param PackageInterface $package
20
+ * @param string $frameworkType
21
+ * @return string
22
+ */
23
+ public function getInstallPath(PackageInterface $package, $frameworkType = '')
24
+ {
25
+ if (
26
+ $package->getName() == 'silverstripe/framework'
27
+ && preg_match('/^\d+\.\d+\.\d+/', $package->getVersion())
28
+ && version_compare($package->getVersion(), '2.999.999') < 0
29
+ ) {
30
+ return $this->templatePath($this->locations['module'], array('name' => 'sapphire'));
31
+ } else {
32
+ return parent::getInstallPath($package, $frameworkType);
33
+ }
34
+
35
+ }
36
+ }
vendor/composer/installers/src/Composer/Installers/Symfony1Installer.php ADDED
@@ -0,0 +1,26 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ namespace Composer\Installers;
3
+
4
+ /**
5
+ * Plugin installer for symfony 1.x
6
+ *
7
+ * @author Jérôme Tamarelle <jerome@tamarelle.net>
8
+ */
9
+ class Symfony1Installer extends BaseInstaller
10
+ {
11
+ protected $locations = array(
12
+ 'plugin' => 'plugins/{$name}/',
13
+ );
14
+
15
+ /**
16
+ * Format package name to CamelCase
17
+ */
18
+ public function inflectPackageVars($vars)
19
+ {
20
+ $vars['name'] = preg_replace_callback('/(-[a-z])/', function ($matches) {
21
+ return strtoupper($matches[0][1]);
22
+ }, $vars['name']);
23
+
24
+ return $vars;
25
+ }
26
+ }
vendor/composer/installers/src/Composer/Installers/TYPO3CmsInstaller.php ADDED
@@ -0,0 +1,14 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ namespace Composer\Installers;
3
+
4
+ /**
5
+ * Extension installer for TYPO3 CMS
6
+ *
7
+ * @author Sascha Egerer <sascha.egerer@dkd.de>
8
+ */
9
+ class TYPO3CmsInstaller extends BaseInstaller
10
+ {
11
+ protected $locations = array(
12
+ 'extension' => 'typo3conf/ext/{$name}/',
13
+ );
14
+ }
vendor/composer/installers/src/Composer/Installers/TYPO3FlowInstaller.php ADDED
@@ -0,0 +1,38 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ namespace Composer\Installers;
3
+
4
+ /**
5
+ * An installer to handle TYPO3 Flow specifics when installing packages.
6
+ */
7
+ class TYPO3FlowInstaller extends BaseInstaller
8
+ {
9
+ protected $locations = array(
10
+ 'package' => 'Packages/Application/{$name}/',
11
+ 'framework' => 'Packages/Framework/{$name}/',
12
+ 'plugin' => 'Packages/Plugins/{$name}/',
13
+ 'site' => 'Packages/Sites/{$name}/',
14
+ 'boilerplate' => 'Packages/Boilerplates/{$name}/',
15
+ 'build' => 'Build/{$name}/',
16
+ );
17
+
18
+ /**
19
+ * Modify the package name to be a TYPO3 Flow style key.
20
+ *
21
+ * @param array $vars
22
+ * @return array
23
+ */
24
+ public function inflectPackageVars($vars)
25
+ {
26
+ $autoload = $this->package->getAutoload();
27
+ if (isset($autoload['psr-0']) && is_array($autoload['psr-0'])) {
28
+ $namespace = key($autoload['psr-0']);
29
+ $vars['name'] = str_replace('\\', '.', $namespace);
30
+ }
31
+ if (isset($autoload['psr-4']) && is_array($autoload['psr-4'])) {
32
+ $namespace = key($autoload['psr-4']);
33
+ $vars['name'] = rtrim(str_replace('\\', '.', $namespace), '.');
34
+ }
35
+
36
+ return $vars;
37
+ }
38
+ }
vendor/composer/installers/src/Composer/Installers/TheliaInstaller.php ADDED
@@ -0,0 +1,12 @@
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ namespace Composer\Installers;
3
+
4
+ class TheliaInstaller extends BaseInstaller
5
+ {
6
+ protected $locations = array(
7
+ 'module' => 'local/modules/{$name}/',
8
+ 'frontoffice-template' => 'templates/frontOffice/{$name}/',
9
+ 'backoffice-template' => 'templates/backOffice/{$name}/',
10
+ 'email-template' => 'templates/email/{$name}/',
11
+ );
12
+ }
vendor/composer/installers/src/Composer/Installers/TuskInstaller.php ADDED
@@ -0,0 +1,14 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ namespace Composer\Installers;
3
+ /**
4
+ * Composer installer for 3rd party Tusk utilities
5
+ * @author Drew Ewing <drew@phenocode.com>
6
+ */
7
+ class TuskInstaller extends BaseInstaller
8
+ {
9
+ protected $locations = array(
10
+ 'task' => '.tusk/tasks/{$name}/',
11
+ 'command' => '.tusk/commands/{$name}/',
12
+ 'asset' => 'assets/tusk/{$name}/',
13
+ );
14
+ }
vendor/composer/installers/src/Composer/Installers/WHMCSInstaller.php ADDED
@@ -0,0 +1,10 @@
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ namespace Composer\Installers;
4
+
5
+ class WHMCSInstaller extends BaseInstaller
6
+ {
7
+ protected $locations = array(
8
+ 'gateway' => 'modules/gateways/{$name}/',
9
+ );
10
+ }
vendor/composer/installers/src/Composer/Installers/WolfCMSInstaller.php ADDED
@@ -0,0 +1,9 @@
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ namespace Composer\Installers;
3
+
4
+ class WolfCMSInstaller extends BaseInstaller
5
+ {
6
+ protected $locations = array(
7
+ 'plugin' => 'wolf/plugins/{$name}/',
8
+ );
9
+ }
vendor/composer/installers/src/Composer/Installers/WordPressInstaller.php ADDED
@@ -0,0 +1,11 @@
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ namespace Composer\Installers;
3
+
4
+ class WordPressInstaller extends BaseInstaller
5
+ {
6
+ protected $locations = array(
7
+ 'plugin' => 'wp-content/plugins/{$name}/',
8
+ 'theme' => 'wp-content/themes/{$name}/',
9
+ 'muplugin' => 'wp-content/mu-plugins/{$name}/',
10
+ );
11
+ }
vendor/composer/installers/src/Composer/Installers/ZendInstaller.php ADDED
@@ -0,0 +1,11 @@
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ namespace Composer\Installers;
3
+
4
+ class ZendInstaller extends BaseInstaller
5
+ {
6
+ protected $locations = array(
7
+ 'library' => 'library/{$name}/',
8
+ 'extra' => 'extras/library/{$name}/',
9
+ 'module' => 'module/{$name}/',
10
+ );
11
+ }
vendor/composer/installers/src/Composer/Installers/ZikulaInstaller.php ADDED
@@ -0,0 +1,10 @@
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ namespace Composer\Installers;
3
+
4
+ class ZikulaInstaller extends BaseInstaller
5
+ {
6
+ protected $locations = array(
7
+ 'module' => 'modules/{$vendor}-{$name}/',
8
+ 'theme' => 'themes/{$vendor}-{$name}/'
9
+ );
10
+ }
vendor/composer/installers/src/bootstrap.php ADDED
@@ -0,0 +1,13 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ function includeIfExists($file)
3
+ {
4
+ if (file_exists($file)) {
5
+ return include $file;
6
+ }
7
+ }
8
+ if ((!$loader = includeIfExists(__DIR__ . '/../vendor/autoload.php')) && (!$loader = includeIfExists(__DIR__ . '/../../../autoload.php'))) {
9
+ die('You must set up the project dependencies, run the following commands:'.PHP_EOL.
10
+ 'curl -s http://getcomposer.org/installer | php'.PHP_EOL.
11
+ 'php composer.phar install'.PHP_EOL);
12
+ }
13
+ return $loader;
vendor/composer/installers/tests/Composer/Installers/Test/AsgardInstallerTest.php ADDED
@@ -0,0 +1,61 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ namespace Composer\Installers\Test;
3
+
4
+ use Composer\Installers\AsgardInstaller;
5
+ use Composer\Package\Package;
6
+ use Composer\Composer;
7
+
8
+ class AsgardInstallerTest extends \PHPUnit_Framework_TestCase
9
+ {
10
+ /**
11
+ * @var OctoberInstaller
12
+ */
13
+ private $installer;
14
+
15
+ public function setUp()
16
+ {
17
+ $this->installer = new AsgardInstaller(
18
+ new Package('NyanCat', '4.2', '4.2'),
19
+ new Composer()
20
+ );
21
+ }
22
+
23
+ /**
24
+ * @dataProvider packageNameInflectionProvider
25
+ */
26
+ public function testInflectPackageVars($type, $name, $expected)
27
+ {
28
+ $this->assertEquals(
29
+ $this->installer->inflectPackageVars(array('name' => $name, 'type' => $type)),
30
+ array('name' => $expected, 'type' => $type)
31
+ );
32
+ }
33
+
34
+ public function packageNameInflectionProvider()
35
+ {
36
+ return array(
37
+ array(
38
+ 'asgard-module',
39
+ 'asgard-module',
40
+ 'Asgard'
41
+ ),
42
+ array(
43
+ 'asgard-module',
44
+ 'blog',
45
+ 'Blog'
46
+ ),
47
+ // tests that exactly one '-theme' is cut off
48
+ array(
49
+ 'asgard-theme',
50
+ 'some-theme-theme',
51
+ 'Some-theme',
52
+ ),
53
+ // tests that names without '-theme' suffix stay valid
54
+ array(
55
+ 'asgard-theme',
56
+ 'someothertheme',
57
+ 'Someothertheme',
58
+ ),
59
+ );
60
+ }
61
+ }
vendor/composer/installers/tests/Composer/Installers/Test/CakePHPInstallerTest.php ADDED
@@ -0,0 +1,115 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ namespace Composer\Installers\Test;
3
+
4
+ use Composer\Installers\CakePHPInstaller;
5
+ use Composer\Repository\RepositoryManager;
6
+ use Composer\Repository\InstalledArrayRepository;
7
+ use Composer\Package\Package;
8
+ use Composer\Package\RootPackage;
9
+ use Composer\Package\Link;
10
+ use Composer\Package\Version\VersionParser;
11
+ use Composer\Composer;
12
+ use Composer\Config;
13
+
14
+ class CakePHPInstallerTest extends TestCase
15
+ {
16
+ private $composer;
17
+ private $io;
18
+
19
+ /**
20
+ * setUp
21
+ *
22
+ * @return void
23
+ */
24
+ public function setUp()
25
+ {
26
+ $this->package = new Package('CamelCased', '1.0', '1.0');
27
+ $this->io = $this->getMock('Composer\IO\PackageInterface');
28
+ $this->composer = new Composer();
29
+ $this->composer->setConfig(new Config(false));
30
+ }
31
+
32
+ /**
33
+ * testInflectPackageVars
34
+ *
35
+ * @return void
36
+ */
37
+ public function testInflectPackageVars()
38
+ {
39
+ $installer = new CakePHPInstaller($this->package, $this->composer);
40
+ $result = $installer->inflectPackageVars(array('name' => 'CamelCased'));
41
+ $this->assertEquals($result, array('name' => 'CamelCased'));
42
+
43
+ $installer = new CakePHPInstaller($this->package, $this->composer);
44
+ $result = $installer->inflectPackageVars(array('name' => 'with-dash'));
45
+ $this->assertEquals($result, array('name' => 'WithDash'));
46
+
47
+ $installer = new CakePHPInstaller($this->package, $this->composer);
48
+ $result = $installer->inflectPackageVars(array('name' => 'with_underscore'));
49
+ $this->assertEquals($result, array('name' => 'WithUnderscore'));
50
+
51
+ $installer = new CakePHPInstaller($this->package, $this->composer);
52
+ $result = $installer->inflectPackageVars(array('name' => 'cake/acl'));
53
+ $this->assertEquals($result, array('name' => 'Cake/Acl'));
54
+
55
+ $installer = new CakePHPInstaller($this->package, $this->composer);
56
+ $result = $installer->inflectPackageVars(array('name' => 'cake/debug-kit'));
57
+ $this->assertEquals($result, array('name' => 'Cake/DebugKit'));
58
+ }
59
+
60
+ /**
61
+ * Test getLocations returning appropriate values based on CakePHP version
62
+ *
63
+ */
64
+ public function testGetLocations() {
65
+ $package = new RootPackage('CamelCased', '1.0', '1.0');
66
+ $composer = $this->composer;
67
+ $rm = new RepositoryManager(
68
+ $this->getMock('Composer\IO\IOInterface'),
69
+ $this->getMock('Composer\Config')
70
+ );
71
+ $composer->setRepositoryManager($rm);
72
+ $installer = new CakePHPInstaller($package, $composer);
73
+
74
+ // 2.0 < cakephp < 3.0
75
+ $this->setCakephpVersion($rm, '2.0.0');
76
+ $result = $installer->getLocations();
77
+ $this->assertContains('Plugin/', $result['plugin']);
78
+
79
+ $this->setCakephpVersion($rm, '2.5.9');
80
+ $result = $installer->getLocations();
81
+ $this->assertContains('Plugin/', $result['plugin']);
82
+
83
+ $this->setCakephpVersion($rm, '~2.5');
84
+ $result = $installer->getLocations();
85
+ $this->assertContains('Plugin/', $result['plugin']);
86
+
87
+ // special handling for 2.x versions when 3.x is still in development
88
+ $this->setCakephpVersion($rm, 'dev-master');
89
+ $result = $installer->getLocations();
90
+ $this->assertContains('Plugin/', $result['plugin']);
91
+
92
+ $this->setCakephpVersion($rm, '>=2.5');
93
+ $result = $installer->getLocations();
94
+ $this->assertContains('Plugin/', $result['plugin']);
95
+
96
+ // cakephp >= 3.0
97
+ $this->setCakephpVersion($rm, '3.0.*-dev');
98
+ $result = $installer->getLocations();
99
+ $this->assertContains('vendor/{$vendor}/{$name}/', $result['plugin']);
100
+
101
+ $this->setCakephpVersion($rm, '~8.8');
102
+ $result = $installer->getLocations();
103
+ $this->assertContains('vendor/{$vendor}/{$name}/', $result['plugin']);
104
+ }
105
+
106
+ protected function setCakephpVersion($rm, $version) {
107
+ $parser = new VersionParser();
108
+ list(, $version) = explode(' ', $parser->parseConstraints($version));
109
+ $installed = new InstalledArrayRepository();
110
+ $package = new Package('cakephp/cakephp', $version, $version);
111
+ $installed->addPackage($package);
112
+ $rm->setLocalRepository($installed);
113
+ }
114
+
115
+ }
vendor/composer/installers/tests/Composer/Installers/Test/CraftInstallerTest.php ADDED
@@ -0,0 +1,83 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ namespace Composer\Installers\Test;
4
+
5
+ use Composer\Installers\CraftInstaller;
6
+
7
+ /**
8
+ * Tests for the CraftInstaller Class
9
+ *
10
+ * @coversDefaultClass Composer\Installers\CraftInstaller
11
+ */
12
+ class CraftInstallerTest extends TestCase
13
+ {
14
+ /** @var CraftInstaller */
15
+ private $installer;
16
+
17
+ /**
18
+ * Sets up the fixture, for example, instantiate the class-under-test.
19
+ *
20
+ * This method is called before a test is executed.
21
+ */
22
+ final public function setup()
23
+ {
24
+ $this->installer = new CraftInstaller();
25
+ }
26
+
27
+ /**
28
+ * @param string $packageName
29
+ * @param string $expectedName
30
+ *
31
+ * @covers ::inflectPackageVars
32
+ *
33
+ * @dataProvider provideExpectedInflectionResults
34
+ */
35
+ final public function testInflectPackageVars($packageName, $expectedName)
36
+ {
37
+ $installer = $this->installer;
38
+
39
+ $vars = array('name' => $packageName);
40
+ $expected = array('name' => $expectedName);
41
+
42
+ $actual = $installer->inflectPackageVars($vars);
43
+
44
+ $this->assertEquals($actual, $expected);
45
+ }
46
+
47
+ /**
48
+ * Provides various names for packages and the expected result after inflection
49
+ *
50
+ * @return array
51
+ */
52
+ final public function provideExpectedInflectionResults()
53
+ {
54
+ return array(
55
+ // lowercase
56
+ array('foo', 'foo'),
57
+ array('craftfoo', 'craftfoo'),
58
+ array('fooplugin', 'fooplugin'),
59
+ array('craftfooplugin', 'craftfooplugin'),
60
+ // lowercase - dash
61
+ array('craft-foo', 'foo'),
62
+ array('foo-plugin', 'foo'),
63
+ array('craft-foo-plugin', 'foo'),
64
+ // lowercase - underscore
65
+ array('craft_foo', 'craft_foo'),
66
+ array('foo_plugin', 'foo_plugin'),
67
+ array('craft_foo_plugin', 'craft_foo_plugin'),
68
+ // CamelCase
69
+ array('Foo', 'Foo'),
70
+ array('CraftFoo', 'CraftFoo'),
71
+ array('FooPlugin', 'FooPlugin'),
72
+ array('CraftFooPlugin', 'CraftFooPlugin'),
73
+ // CamelCase - Dash
74
+ array('Craft-Foo', 'Foo'),
75
+ array('Foo-Plugin', 'Foo'),
76
+ array('Craft-Foo-Plugin', 'Foo'),
77
+ // CamelCase - underscore
78
+ array('Craft_Foo', 'Craft_Foo'),
79
+ array('Foo_Plugin', 'Foo_Plugin'),
80
+ array('Craft_Foo_Plugin', 'Craft_Foo_Plugin'),
81
+ );
82
+ }
83
+ }
vendor/composer/installers/tests/Composer/Installers/Test/DokuWikiInstallerTest.php ADDED
@@ -0,0 +1,89 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ namespace Composer\Installers\Test;
3
+
4
+ use Composer\Installers\DokuWikiInstaller;
5
+ use Composer\Package\Package;
6
+ use Composer\Composer;
7
+
8
+ class DokuWikiInstallerTest extends \PHPUnit_Framework_TestCase
9
+ {
10
+ /**
11
+ * @var DokuWikiInstaller
12
+ */
13
+ private $installer;
14
+
15
+ public function setUp()
16
+ {
17
+ $this->installer = new DokuWikiInstaller(
18
+ new Package('NyanCat', '4.2', '4.2'),
19
+ new Composer()
20
+ );
21
+ }
22
+
23
+ /**
24
+ * @dataProvider packageNameInflectionProvider
25
+ */
26
+ public function testInflectPackageVars($type, $name, $expected)
27
+ {
28
+ $this->assertEquals(
29
+ $this->installer->inflectPackageVars(array('name' => $name, 'type'=>$type)),
30
+ array('name' => $expected, 'type'=>$type)
31
+ );
32
+ }
33
+
34
+ public function packageNameInflectionProvider()
35
+ {
36
+ return array(
37
+ array(
38
+ 'dokuwiki-plugin',
39
+ 'dokuwiki-test-plugin',
40
+ 'test',
41
+ ),
42
+ array(
43
+ 'dokuwiki-plugin',
44
+ 'test-plugin',
45
+ 'test',
46
+ ),
47
+ array(
48
+ 'dokuwiki-plugin',
49
+ 'dokuwiki_test',
50
+ 'test',
51
+ ),
52
+ array(
53
+ 'dokuwiki-plugin',
54
+ 'test',
55
+ 'test',
56
+ ),
57
+ array(
58
+ 'dokuwiki-plugin',
59
+ 'test-template',
60
+ 'test-template',
61
+ ),
62
+ array(
63
+ 'dokuwiki-template',
64
+ 'dokuwiki-test-template',
65
+ 'test',
66
+ ),
67
+ array(
68
+ 'dokuwiki-template',
69
+ 'test-template',
70
+ 'test',
71
+ ),
72
+ array(
73
+ 'dokuwiki-template',
74
+ 'dokuwiki_test',
75
+ 'test',
76
+ ),
77
+ array(
78
+ 'dokuwiki-template',
79
+ 'test',
80
+ 'test',
81
+ ),
82
+ array(
83
+ 'dokuwiki-template',
84
+ 'test-plugin',
85
+ 'test-plugin',
86
+ ),
87
+ );
88
+ }
89
+ }
vendor/composer/installers/tests/Composer/Installers/Test/GravInstallerTest.php ADDED
@@ -0,0 +1,63 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ namespace Composer\Installers\Test;
3
+
4
+ use Composer\Composer;
5
+ use Composer\Installers\GravInstaller;
6
+
7
+ class GravInstallerTest extends TestCase
8
+ {
9
+ /* @var \Composer\Composer */
10
+ protected $composer;
11
+
12
+ public function setUp()
13
+ {
14
+ $this->composer = new Composer();
15
+ }
16
+
17
+ public function testInflectPackageVars()
18
+ {
19
+ $package = $this->getPackage('vendor/name', '0.0.0');
20
+ $installer = new GravInstaller($package, $this->composer);
21
+ $packageVars = $this->getPackageVars($package);
22
+
23
+ $result = $installer->inflectPackageVars(array_merge($packageVars, array('name' => 'test')));
24
+ $this->assertEquals('test', $result['name']);
25
+
26
+ foreach ($installer->getLocations() as $name => $location) {
27
+ $result = $installer->inflectPackageVars(array_merge($packageVars, array('name' => "$name-test")));
28
+ $this->assertEquals('test', $result['name']);
29
+ $result = $installer->inflectPackageVars(array_merge($packageVars, array('name' => "test-$name")));
30
+ $this->assertEquals('test', $result['name']);
31
+ $result = $installer->inflectPackageVars(array_merge($packageVars, array('name' => "$name-test-test")));
32
+ $this->assertEquals('test-test', $result['name']);
33
+ $result = $installer->inflectPackageVars(array_merge($packageVars, array('name' => "test-test-$name")));
34
+ $this->assertEquals('test-test', $result['name']);
35
+ $result = $installer->inflectPackageVars(array_merge($packageVars, array('name' => "grav-$name-test")));
36
+ $this->assertEquals('test', $result['name']);
37
+ $result = $installer->inflectPackageVars(array_merge($packageVars, array('name' => "grav-test-$name")));
38
+ $this->assertEquals('test', $result['name']);
39
+ $result = $installer->inflectPackageVars(array_merge($packageVars, array('name' => "grav-$name-test-test")));
40
+ $this->assertEquals('test-test', $result['name']);
41
+ $result = $installer->inflectPackageVars(array_merge($packageVars, array('name' => "grav-test-test-$name")));
42
+ $this->assertEquals('test-test', $result['name']);
43
+ }
44
+ }
45
+
46
+ /**
47
+ * @param $package \Composer\Package\PackageInterface
48
+ */
49
+ public function getPackageVars($package)
50
+ {
51
+ $type = $package->getType();
52
+
53
+ $prettyName = $package->getPrettyName();
54
+ if (strpos($prettyName, '/') !== false) {
55
+ list($vendor, $name) = explode('/', $prettyName);
56
+ } else {
57
+ $vendor = '';
58
+ $name = $prettyName;
59
+ }
60
+
61
+ return compact('name', 'vendor', 'type');
62
+ }
63
+ }
vendor/composer/installers/tests/Composer/Installers/Test/InstallerTest.php ADDED
@@ -0,0 +1,428 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ namespace Composer\Installers\Test;
3
+
4
+ use Composer\Installers\Installer;
5
+ use Composer\Util\Filesystem;
6
+ use Composer\Package\Package;
7
+ use Composer\Package\RootPackage;
8
+ use Composer\Composer;
9
+ use Composer\Config;
10
+
11
+ class InstallerTest extends TestCase
12
+ {
13
+ private $composer;
14
+ private $config;
15
+ private $vendorDir;
16
+ private $binDir;
17
+ private $dm;
18
+ private $repository;
19
+ private $io;
20
+ private $fs;
21
+
22
+ /**
23
+ * setUp
24
+ *
25
+ * @return void
26
+ */
27
+ public function setUp()
28
+ {
29
+ $this->fs = new Filesystem;
30
+
31
+ $this->composer = new Composer();
32
+ $this->config = new Config();
33
+ $this->composer->setConfig($this->config);
34
+
35
+ $this->vendorDir = realpath(sys_get_temp_dir()) . DIRECTORY_SEPARATOR . 'baton-test-vendor';
36
+ $this->ensureDirectoryExistsAndClear($this->vendorDir);
37
+
38
+ $this->binDir = realpath(sys_get_temp_dir()) . DIRECTORY_SEPARATOR . 'baton-test-bin';
39
+ $this->ensureDirectoryExistsAndClear($this->binDir);
40
+
41
+ $this->config->merge(array(
42
+ 'config' => array(
43
+ 'vendor-dir' => $this->vendorDir,
44
+ 'bin-dir' => $this->binDir,
45
+ ),
46
+ ));
47
+
48
+ $this->dm = $this->getMockBuilder('Composer\Downloader\DownloadManager')
49
+ ->disableOriginalConstructor()
50
+ ->getMock();
51
+ $this->composer->setDownloadManager($this->dm);
52
+
53
+ $this->repository = $this->getMock('Composer\Repository\InstalledRepositoryInterface');
54
+ $this->io = $this->getMock('Composer\IO\IOInterface');
55
+ }
56
+
57
+ /**
58
+ * tearDown
59
+ *
60
+ * @return void
61
+ */
62
+ public function tearDown()
63
+ {
64
+ $this->fs->removeDirectory($this->vendorDir);
65
+ $this->fs->removeDirectory($this->binDir);
66
+ }
67
+
68
+ /**
69
+ * testSupports
70
+ *
71
+ * @return void
72
+ *
73
+ * @dataProvider dataForTestSupport
74
+ */
75
+ public function testSupports($type, $expected)
76
+ {
77
+ $installer = new Installer($this->io, $this->composer);
78
+ $this->assertSame($expected, $installer->supports($type), sprintf('Failed to show support for %s', $type));
79
+ }
80
+
81
+ /**
82
+ * dataForTestSupport
83
+ */
84
+ public function dataForTestSupport()
85
+ {
86
+ return array(
87
+ array('agl-module', true),
88
+ array('aimeos-extension', true),
89
+ array('annotatecms-module', true),
90
+ array('annotatecms-component', true),
91
+ array('annotatecms-service', true),
92
+ array('bitrix-module', true),
93
+ array('bitrix-component', true),
94
+ array('bitrix-theme', true),
95
+ array('bonefish-package', true),
96
+ array('cakephp', false),
97
+ array('cakephp-', false),
98
+ array('cakephp-app', false),
99
+ array('cakephp-plugin', true),
100
+ array('chef-cookbook', true),
101
+ array('chef-role', true),
102
+ array('codeigniter-app', false),
103
+ array('codeigniter-library', true),
104
+ array('codeigniter-third-party', true),
105
+ array('codeigniter-module', true),
106
+ array('concrete5-block', true),
107
+ array('concrete5-package', true),
108
+ array('concrete5-theme', true),
109
+ array('concrete5-update', true),
110
+ array('craft-plugin', true),
111
+ array('croogo-plugin', true),
112
+ array('croogo-theme', true),
113
+ array('dokuwiki-plugin', true),
114
+ array('dokuwiki-template', true),
115
+ array('drupal-module', true),
116
+ array('dolibarr-module', true),
117
+ array('elgg-plugin', true),
118
+ array('fuel-module', true),
119
+ array('fuel-package', true),
120
+ array('fuel-theme', true),
121
+ array('fuelphp-component', true),
122
+ array('hurad-plugin', true),
123
+ array('hurad-theme', true),
124
+ array('joomla-library', true),
125
+ array('kirby-plugin', true),
126
+ array('kohana-module', true),
127
+ array('laravel-library', true),
128
+ array('lithium-library', true),
129
+ array('magento-library', true),
130
+ array('mako-package', true),
131
+ array('modxevo-snippet', true),
132
+ array('modxevo-plugin', true),
133
+ array('modxevo-module', true),
134
+ array('modxevo-template', true),
135
+ array('modxevo-lib', true),
136
+ array('mediawiki-extension', true),
137
+ array('mediawiki-skin', true),
138
+ array('microweber-module', true),
139
+ array('modulework-module', true),
140
+ array('moodle-mod', true),
141
+ array('october-module', true),
142
+ array('october-plugin', true),
143
+ array('piwik-plugin', true),
144
+ array('phpbb-extension', true),
145
+ array('pimcore-plugin', true),
146
+ array('ppi-module', true),
147
+ array('prestashop-module', true),
148
+ array('prestashop-theme', true),
149
+ array('puppet-module', true),
150
+ array('redaxo-addon', true),
151
+ array('redaxo-bestyle-plugin', true),
152
+ array('roundcube-plugin', true),
153
+ array('shopware-backend-plugin', true),
154
+ array('shopware-core-plugin', true),
155
+ array('shopware-frontend-plugin', true),
156
+ array('shopware-theme', true),
157
+ array('silverstripe-module', true),
158
+ array('silverstripe-theme', true),
159
+ array('smf-module', true),
160
+ array('smf-theme', true),
161
+ array('symfony1-plugin', true),
162
+ array('thelia-module', true),
163
+ array('thelia-frontoffice-template', true),
164
+ array('thelia-backoffice-template', true),
165
+ array('thelia-email-template', true),
166
+ array('tusk-task', true),
167
+ array('tusk-asset', true),
168
+ array('typo3-flow-plugin', true),
169
+ array('typo3-cms-extension', true),
170
+ array('whmcs-gateway', true),
171
+ array('wolfcms-plugin', true),
172
+ array('wordpress-plugin', true),
173
+ array('wordpress-core', false),
174
+ array('zend-library', true),
175
+ array('zikula-module', true),
176
+ array('zikula-theme', true),
177
+ array('kodicms-plugin', true),
178
+ array('kodicms-media', true),
179
+ );
180
+ }
181
+
182
+ /**
183
+ * testInstallPath
184
+ *
185
+ * @dataProvider dataForTestInstallPath
186
+ */
187
+ public function testInstallPath($type, $path, $name, $version = '1.0.0')
188
+ {
189
+ $installer = new Installer($this->io, $this->composer);
190
+ $package = new Package($name, $version, $version);
191
+
192
+ $package->setType($type);
193
+ $result = $installer->getInstallPath($package);
194
+ $this->assertEquals($path, $result);
195
+ }
196
+
197
+ /**
198
+ * dataFormTestInstallPath
199
+ */
200
+ public function dataForTestInstallPath()
201
+ {
202
+ return array(
203
+ array('agl-module', 'More/MyTestPackage/', 'agl/my_test-package'),
204
+ array('aimeos-extension', 'ext/ai-test/', 'author/ai-test'),
205
+ array('annotatecms-module', 'addons/modules/my_module/', 'vysinsky/my_module'),
206
+ array('annotatecms-component', 'addons/components/my_component/', 'vysinsky/my_component'),
207
+ array('annotatecms-service', 'addons/services/my_service/', 'vysinsky/my_service'),
208
+ array('bitrix-module', 'bitrix/modules/my_module/', 'author/my_module'),
209
+ array('bitrix-component', 'bitrix/components/my_component/', 'author/my_component'),
210
+ array('bitrix-theme', 'bitrix/templates/my_theme/', 'author/my_theme'),
211
+ array('bonefish-package', 'Packages/bonefish/package/', 'bonefish/package'),
212
+ array('cakephp-plugin', 'Plugin/Ftp/', 'shama/ftp'),
213
+ array('chef-cookbook', 'Chef/mre/my_cookbook/', 'mre/my_cookbook'),
214
+ array('chef-role', 'Chef/roles/my_role/', 'mre/my_role'),
215
+ array('codeigniter-library', 'application/libraries/my_package/', 'shama/my_package'),
216
+ array('codeigniter-module', 'application/modules/my_package/', 'shama/my_package'),
217
+ array('concrete5-block', 'blocks/concrete5_block/', 'remo/concrete5_block'),
218
+ array('concrete5-package', 'packages/concrete5_package/', 'remo/concrete5_package'),
219
+ array('concrete5-theme', 'themes/concrete5_theme/', 'remo/concrete5_theme'),
220
+ array('concrete5-update', 'updates/concrete5/', 'concrete5/concrete5'),
221
+ array('craft-plugin', 'craft/plugins/my_plugin/', 'mdcpepper/my_plugin'),
222
+ array('croogo-plugin', 'Plugin/Sitemaps/', 'fahad19/sitemaps'),
223
+ array('croogo-theme', 'View/Themed/Readable/', 'rchavik/readable'),
224
+ array('dokuwiki-plugin', 'lib/plugins/someplugin/', 'author/someplugin'),
225
+ array('dokuwiki-template', 'lib/tpl/sometemplate/', 'author/sometemplate'),
226
+ array('dolibarr-module', 'htdocs/custom/my_module/', 'shama/my_module'),
227
+ array('drupal-module', 'modules/my_module/', 'shama/my_module'),
228
+ array('drupal-theme', 'themes/my_module/', 'shama/my_module'),
229
+ array('drupal-profile', 'profiles/my_module/', 'shama/my_module'),
230
+ array('drupal-drush', 'drush/my_module/', 'shama/my_module'),
231
+ array('elgg-plugin', 'mod/sample_plugin/', 'test/sample_plugin'),
232
+ array('fuel-module', 'fuel/app/modules/module/', 'fuel/module'),
233
+ array('fuel-package', 'fuel/packages/orm/', 'fuel/orm'),
234
+ array('fuel-theme', 'fuel/app/themes/theme/', 'fuel/theme'),
235
+ array('fuelphp-component', 'components/demo/', 'fuelphp/demo'),
236
+ array('hurad-plugin', 'plugins/Akismet/', 'atkrad/akismet'),
237
+ array('hurad-theme', 'plugins/Hurad2013/', 'atkrad/Hurad2013'),
238
+ array('joomla-plugin', 'plugins/my_plugin/', 'shama/my_plugin'),
239
+ array('kirby-plugin', 'site/plugins/my_plugin/', 'shama/my_plugin'),
240
+ array('kohana-module', 'modules/my_package/', 'shama/my_package'),
241
+ array('laravel-library', 'libraries/my_package/', 'shama/my_package'),
242
+ array('lithium-library', 'libraries/li3_test/', 'user/li3_test'),
243
+ array('magento-library', 'lib/foo/', 'test/foo'),
244
+ array('modxevo-snippet', 'assets/snippets/my_snippet/', 'shama/my_snippet'),
245
+ array('modxevo-plugin', 'assets/plugins/my_plugin/', 'shama/my_plugin'),
246
+ array('modxevo-module', 'assets/modules/my_module/', 'shama/my_module'),
247
+ array('modxevo-template', 'assets/templates/my_template/', 'shama/my_template'),
248
+ array('modxevo-lib', 'assets/lib/my_lib/', 'shama/my_lib'),
249
+ array('mako-package', 'app/packages/my_package/', 'shama/my_package'),
250
+ array('mediawiki-extension', 'extensions/APC/', 'author/APC'),
251
+ array('mediawiki-extension', 'extensions/APC/', 'author/APC-extension'),
252
+ array('mediawiki-extension', 'extensions/UploadWizard/', 'author/upload-wizard'),
253
+ array('mediawiki-extension', 'extensions/SyntaxHighlight_GeSHi/', 'author/syntax-highlight_GeSHi'),
254
+ array('mediawiki-skin', 'skins/someskin/', 'author/someskin-skin'),
255
+ array('mediawiki-skin', 'skins/someskin/', 'author/someskin'),
256
+ array('microweber-module', 'userfiles/modules/my-thing/', 'author/my-thing-module'),
257
+ array('modulework-module', 'modules/my_package/', 'shama/my_package'),
258
+ array('moodle-mod', 'mod/my_package/', 'shama/my_package'),
259
+ array('october-module', 'modules/my_plugin/', 'shama/my_plugin'),
260
+ array('october-plugin', 'plugins/shama/my_plugin/', 'shama/my_plugin'),
261
+ array('october-theme', 'themes/my_theme/', 'shama/my_theme'),
262
+ array('piwik-plugin', 'plugins/VisitSummary/', 'shama/visit-summary'),
263
+ array('prestashop-module', 'modules/a-module/', 'vendor/a-module'),
264
+ array('prestashop-theme', 'themes/a-theme/', 'vendor/a-theme'),
265
+ array('phpbb-extension', 'ext/test/foo/', 'test/foo'),
266
+ array('phpbb-style', 'styles/foo/', 'test/foo'),
267
+ array('phpbb-language', 'language/foo/', 'test/foo'),
268
+ array('pimcore-plugin', 'plugins/MyPlugin/', 'ubikz/my_plugin'),
269
+ array('ppi-module', 'modules/foo/', 'test/foo'),
270
+ array('puppet-module', 'modules/puppet-name/', 'puppet/puppet-name'),
271
+ array('redaxo-addon', 'redaxo/include/addons/my_plugin/', 'shama/my_plugin'),
272
+ array('redaxo-bestyle-plugin', 'redaxo/include/addons/be_style/plugins/my_plugin/', 'shama/my_plugin'),
273
+ array('roundcube-plugin', 'plugins/base/', 'test/base'),
274
+ array('roundcube-plugin', 'plugins/replace_dash/', 'test/replace-dash'),
275
+ array('shopware-backend-plugin', 'engine/Shopware/Plugins/Local/Backend/ShamaMyBackendPlugin/', 'shama/my-backend-plugin'),
276
+ array('shopware-core-plugin', 'engine/Shopware/Plugins/Local/Core/ShamaMyCorePlugin/', 'shama/my-core-plugin'),
277
+ array('shopware-frontend-plugin', 'engine/Shopware/Plugins/Local/Frontend/ShamaMyFrontendPlugin/', 'shama/my-frontend-plugin'),
278
+ array('shopware-theme', 'templates/my_theme/', 'shama/my-theme'),
279
+ array('silverstripe-module', 'my_module/', 'shama/my_module'),
280
+ array('silverstripe-module', 'sapphire/', 'silverstripe/framework', '2.4.0'),
281
+ array('silverstripe-module', 'framework/', 'silverstripe/framework', '3.0.0'),
282
+ array('silverstripe-module', 'framework/', 'silverstripe/framework', '3.0.0-rc1'),
283
+ array('silverstripe-module', 'framework/', 'silverstripe/framework', 'my/branch'),
284
+ array('silverstripe-theme', 'themes/my_theme/', 'shama/my_theme'),
285
+ array('smf-module', 'Sources/my_module/', 'shama/my_module'),
286
+ array('smf-theme', 'Themes/my_theme/', 'shama/my_theme'),
287
+ array('symfony1-plugin', 'plugins/sfShamaPlugin/', 'shama/sfShamaPlugin'),
288
+ array('symfony1-plugin', 'plugins/sfShamaPlugin/', 'shama/sf-shama-plugin'),
289
+ array('thelia-module', 'local/modules/my_module/', 'shama/my_module'),
290
+ array('thelia-frontoffice-template', 'templates/frontOffice/my_template_fo/', 'shama/my_template_fo'),
291
+ array('thelia-backoffice-template', 'templates/backOffice/my_template_bo/', 'shama/my_template_bo'),
292
+ array('thelia-email-template', 'templates/email/my_template_email/', 'shama/my_template_email'),
293
+ array('tusk-task', '.tusk/tasks/my_task/', 'shama/my_task'),
294
+ array('typo3-flow-package', 'Packages/Application/my_package/', 'shama/my_package'),
295
+ array('typo3-flow-build', 'Build/my_package/', 'shama/my_package'),
296
+ array('typo3-cms-extension', 'typo3conf/ext/my_extension/', 'shama/my_extension'),
297
+ array('whmcs-gateway', 'modules/gateways/gateway_name/', 'vendor/gateway_name'),
298
+ array('wolfcms-plugin', 'wolf/plugins/my_plugin/', 'shama/my_plugin'),
299
+ array('wordpress-plugin', 'wp-content/plugins/my_plugin/', 'shama/my_plugin'),
300
+ array('wordpress-muplugin', 'wp-content/mu-plugins/my_plugin/', 'shama/my_plugin'),
301
+ array('zend-extra', 'extras/library/zend_test/', 'shama/zend_test'),
302
+ array('zikula-module', 'modules/my-test_module/', 'my/test_module'),
303
+ array('zikula-theme', 'themes/my-test_theme/', 'my/test_theme'),
304
+ array('kodicms-media', 'cms/media/vendor/my_media/', 'shama/my_media'),
305
+ array('kodicms-plugin', 'cms/plugins/my_plugin/', 'shama/my_plugin'),
306
+ );
307
+ }
308
+
309
+ /**
310
+ * testGetCakePHPInstallPathException
311
+ *
312
+ * @return void
313
+ *
314
+ * @expectedException \InvalidArgumentException
315
+ */
316
+ public function testGetCakePHPInstallPathException()
317
+ {
318
+ $installer = new Installer($this->io, $this->composer);
319
+ $package = new Package('shama/ftp', '1.0.0', '1.0.0');
320
+
321
+ $package->setType('cakephp-whoops');
322
+ $result = $installer->getInstallPath($package);
323
+ }
324
+
325
+ /**
326
+ * testCustomInstallPath
327
+ */
328
+ public function testCustomInstallPath()
329
+ {
330
+ $installer = new Installer($this->io, $this->composer);
331
+ $package = new Package('shama/ftp', '1.0.0', '1.0.0');
332
+ $package->setType('cakephp-plugin');
333
+ $consumerPackage = new RootPackage('foo/bar', '1.0.0', '1.0.0');
334
+ $this->composer->setPackage($consumerPackage);
335
+ $consumerPackage->setExtra(array(
336
+ 'installer-paths' => array(
337
+ 'my/custom/path/{$name}/' => array(
338
+ 'shama/ftp',
339
+ 'foo/bar',
340
+ ),
341
+ ),
342
+ ));
343
+ $result = $installer->getInstallPath($package);
344
+ $this->assertEquals('my/custom/path/Ftp/', $result);
345
+ }
346
+
347
+ /**
348
+ * testCustomInstallerName
349
+ */
350
+ public function testCustomInstallerName()
351
+ {
352
+ $installer = new Installer($this->io, $this->composer);
353
+ $package = new Package('shama/cakephp-ftp-plugin', '1.0.0', '1.0.0');
354
+ $package->setType('cakephp-plugin');
355
+ $package->setExtra(array(
356
+ 'installer-name' => 'FTP',
357
+ ));
358
+ $result = $installer->getInstallPath($package);
359
+ $this->assertEquals('Plugin/FTP/', $result);
360
+ }
361
+
362
+ /**
363
+ * testCustomTypePath
364
+ */
365
+ public function testCustomTypePath()
366
+ {
367
+ $installer = new Installer($this->io, $this->composer);
368
+ $package = new Package('slbmeh/my_plugin', '1.0.0', '1.0.0');
369
+ $package->setType('wordpress-plugin');
370
+ $consumerPackage = new RootPackage('foo/bar', '1.0.0', '1.0.0');
371
+ $this->composer->setPackage($consumerPackage);
372
+ $consumerPackage->setExtra(array(
373
+ 'installer-paths' => array(
374
+ 'my/custom/path/{$name}/' => array(
375
+ 'type:wordpress-plugin'
376
+ ),
377
+ ),
378
+ ));
379
+ $result = $installer->getInstallPath($package);
380
+ $this->assertEquals('my/custom/path/my_plugin/', $result);
381
+ }
382
+
383
+ /**
384
+ * testNoVendorName
385
+ */
386
+ public function testNoVendorName()
387
+ {
388
+ $installer = new Installer($this->io, $this->composer);
389
+ $package = new Package('sfPhpunitPlugin', '1.0.0', '1.0.0');
390
+
391
+ $package->setType('symfony1-plugin');
392
+ $result = $installer->getInstallPath($package);
393
+ $this->assertEquals('plugins/sfPhpunitPlugin/', $result);
394
+ }
395
+
396
+ /**
397
+ * testTypo3Inflection
398
+ */
399
+ public function testTypo3Inflection()
400
+ {
401
+ $installer = new Installer($this->io, $this->composer);
402
+ $package = new Package('typo3/fluid', '1.0.0', '1.0.0');
403
+
404
+ $package->setAutoload(array(
405
+ 'psr-0' => array(
406
+ 'TYPO3\\Fluid' => 'Classes',
407
+ ),
408
+ ));
409
+
410
+ $package->setType('typo3-flow-package');
411
+ $result = $installer->getInstallPath($package);
412
+ $this->assertEquals('Packages/Application/TYPO3.Fluid/', $result);
413
+ }
414
+
415
+ public function testUninstallAndDeletePackageFromLocalRepo()
416
+ {
417
+ $package = new Package('foo', '1.0.0', '1.0.0');
418
+
419
+ $installer = $this->getMock('Composer\Installers\Installer', array('getInstallPath'), array($this->io, $this->composer));
420
+ $installer->expects($this->once())->method('getInstallPath')->with($package)->will($this->returnValue(sys_get_temp_dir().'/foo'));
421
+
422
+ $repo = $this->getMock('Composer\Repository\InstalledRepositoryInterface');
423
+ $repo->expects($this->once())->method('hasPackage')->with($package)->will($this->returnValue(true));
424
+ $repo->expects($this->once())->method('removePackage')->with($package);
425
+
426
+ $installer->uninstall($repo, $package);
427
+ }
428
+ }
vendor/composer/installers/tests/Composer/Installers/Test/MediaWikiInstallerTest.php ADDED
@@ -0,0 +1,66 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ namespace Composer\Installers\Test;
3
+
4
+ use Composer\Installers\MediaWikiInstaller;
5
+ use Composer\Package\Package;
6
+ use Composer\Composer;
7
+
8
+ class MediaWikiInstallerTest extends \PHPUnit_Framework_TestCase
9
+ {
10
+ /**
11
+ * @var MediaWikiInstaller
12
+ */
13
+ private $installer;
14
+
15
+ public function setUp()
16
+ {
17
+ $this->installer = new MediaWikiInstaller(
18
+ new Package('NyanCat', '4.2', '4.2'),
19
+ new Composer()
20
+ );
21
+ }
22
+
23
+ /**
24
+ * @dataProvider packageNameInflectionProvider
25
+ */
26
+ public function testInflectPackageVars($type, $name, $expected)
27
+ {
28
+ $this->assertEquals(
29
+ $this->installer->inflectPackageVars(array('name' => $name, 'type'=>$type)),
30
+ array('name' => $expected, 'type'=>$type)
31
+ );
32
+ }
33
+
34
+ public function packageNameInflectionProvider()
35
+ {
36
+ return array(
37
+ array(
38
+ 'mediawiki-extension',
39
+ 'sub-page-list',
40
+ 'SubPageList',
41
+ ),
42
+ array(
43
+ 'mediawiki-extension',
44
+ 'sub-page-list-extension',
45
+ 'SubPageList',
46
+ ),
47
+ array(
48
+ 'mediawiki-extension',
49
+ 'semantic-mediawiki',
50
+ 'SemanticMediawiki',
51
+ ),
52
+ // tests that exactly one '-skin' is cut off, and that skins do not get ucwords treatment like extensions
53
+ array(
54
+ 'mediawiki-skin',
55
+ 'some-skin-skin',
56
+ 'some-skin',
57
+ ),
58
+ // tests that names without '-skin' suffix stay valid
59
+ array(
60
+ 'mediawiki-skin',
61
+ 'someotherskin',
62
+ 'someotherskin',
63
+ ),
64
+ );
65
+ }
66
+ }
vendor/composer/installers/tests/Composer/Installers/Test/OctoberInstallerTest.php ADDED
@@ -0,0 +1,66 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ namespace Composer\Installers\Test;
3
+
4
+ use Composer\Installers\OctoberInstaller;
5
+ use Composer\Package\Package;
6
+ use Composer\Composer;
7
+
8
+ class OctoberInstallerTest extends \PHPUnit_Framework_TestCase
9
+ {
10
+ /**
11
+ * @var OctoberInstaller
12
+ */
13
+ private $installer;
14
+
15
+ public function setUp()
16
+ {
17
+ $this->installer = new OctoberInstaller(
18
+ new Package('NyanCat', '4.2', '4.2'),
19
+ new Composer()
20
+ );
21
+ }
22
+
23
+ /**
24
+ * @dataProvider packageNameInflectionProvider
25
+ */
26
+ public function testInflectPackageVars($type, $name, $expected)
27
+ {
28
+ $this->assertEquals(
29
+ $this->installer->inflectPackageVars(array('name' => $name, 'type' => $type)),
30
+ array('name' => $expected, 'type' => $type)
31
+ );
32
+ }
33
+
34
+ public function packageNameInflectionProvider()
35
+ {
36
+ return array(
37
+ array(
38
+ 'october-plugin',
39
+ 'subpagelist',
40
+ 'subpagelist',
41
+ ),
42
+ array(
43
+ 'october-plugin',
44
+ 'subpagelist-plugin',
45
+ 'subpagelist',
46
+ ),
47
+ array(
48
+ 'october-plugin',
49
+ 'semanticoctober',
50
+ 'semanticoctober',
51
+ ),
52
+ // tests that exactly one '-theme' is cut off
53
+ array(
54
+ 'october-theme',
55
+ 'some-theme-theme',
56
+ 'some-theme',
57
+ ),
58
+ // tests that names without '-theme' suffix stay valid
59
+ array(
60
+ 'october-theme',
61
+ 'someothertheme',
62
+ 'someothertheme',
63
+ ),
64
+ );
65
+ }
66
+ }
vendor/composer/installers/tests/Composer/Installers/Test/PimcoreInstallerTest.php ADDED
@@ -0,0 +1,44 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ namespace Composer\Installers\Test;
3
+
4
+ use Composer\Installers\PimcoreInstaller;
5
+ use Composer\Package\Package;
6
+ use Composer\Composer;
7
+
8
+ class PimcoreInstallerTest extends TestCase
9
+ {
10
+ private $composer;
11
+ private $io;
12
+
13
+ /**
14
+ * setUp
15
+ *
16
+ * @return void
17
+ */
18
+ public function setUp()
19
+ {
20
+ $this->package = new Package('CamelCased', '1.0', '1.0');
21
+ $this->io = $this->getMock('Composer\IO\PackageInterface');
22
+ $this->composer = new Composer();
23
+ }
24
+
25
+ /**
26
+ * testInflectPackageVars
27
+ *
28
+ * @return void
29
+ */
30
+ public function testInflectPackageVars()
31
+ {
32
+ $installer = new PimcoreInstaller($this->package, $this->composer);
33
+ $result = $installer->inflectPackageVars(array('name' => 'CamelCased'));
34
+ $this->assertEquals($result, array('name' => 'CamelCased'));
35
+
36
+ $installer = new PimcoreInstaller($this->package, $this->composer);
37
+ $result = $installer->inflectPackageVars(array('name' => 'with-dash'));
38
+ $this->assertEquals($result, array('name' => 'WithDash'));
39
+
40
+ $installer = new PimcoreInstaller($this->package, $this->composer);
41
+ $result = $installer->inflectPackageVars(array('name' => 'with_underscore'));
42
+ $this->assertEquals($result, array('name' => 'WithUnderscore'));
43
+ }
44
+ }
vendor/composer/installers/tests/Composer/Installers/Test/PiwikInstallerTest.php ADDED
@@ -0,0 +1,63 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ namespace Composer\Installers\Test;
3
+
4
+ use Composer\Composer;
5
+ use Composer\Installers\PiwikInstaller;
6
+ use Composer\Package\Package;
7
+ use Composer\Package\PackageInterface;
8
+
9
+ /**
10
+ * Class PiwikInstallerTest
11
+ *
12
+ * @package Composer\Installers\Test
13
+ */
14
+ class PiwikInstallerTest extends TestCase
15
+ {
16
+ /**
17
+ * @varComposer
18
+ */
19
+ private $composer;
20
+
21
+ /**
22
+ * @var PackageInterface
23
+ */
24
+ private $io;
25
+
26
+ /**
27
+ * @var Package
28
+ */
29
+ private $package;
30
+
31
+ /**
32
+ * setUp
33
+ *
34
+ * @return void
35
+ */
36
+ public function setUp()
37
+ {
38
+ $this->package = new Package('VisitSummary', '1.0', '1.0');
39
+ $this->io = $this->getMock('Composer\IO\PackageInterface');
40
+ $this->composer = new Composer();
41
+ }
42
+
43
+ /**
44
+ * testInflectPackageVars
45
+ *
46
+ * @return void
47
+ */
48
+ public function testInflectPackageVars()
49
+ {
50
+ $installer = new PiwikInstaller($this->package, $this->composer);
51
+ $result = $installer->inflectPackageVars(array('name' => 'VisitSummary'));
52
+ $this->assertEquals($result, array('name' => 'VisitSummary'));
53
+
54
+ $installer = new PiwikInstaller($this->package, $this->composer);
55
+ $result = $installer->inflectPackageVars(array('name' => 'visit-summary'));
56
+ $this->assertEquals($result, array('name' => 'VisitSummary'));
57
+
58
+ $installer = new PiwikInstaller($this->package, $this->composer);
59
+ $result = $installer->inflectPackageVars(array('name' => 'visit_summary'));
60
+ $this->assertEquals($result, array('name' => 'VisitSummary'));
61
+ }
62
+
63
+ }
vendor/composer/installers/tests/Composer/Installers/Test/TestCase.php ADDED
@@ -0,0 +1,64 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ /*
4
+ * This file is part of Composer.
5
+ *
6
+ * (c) Nils Adermann <naderman@naderman.de>
7
+ * Jordi Boggiano <j.boggiano@seld.be>
8
+ *
9
+ * For the full copyright and license information, please view the LICENSE
10
+ * file that was distributed with this source code.
11
+ */
12
+
13
+ namespace Composer\Installers\Test;
14
+
15
+ use Composer\Package\Version\VersionParser;
16
+ use Composer\Package\Package;
17
+ use Composer\Package\AliasPackage;
18
+ use Composer\Package\LinkConstraint\VersionConstraint;
19
+ use Composer\Util\Filesystem;
20
+
21
+ abstract class TestCase extends \PHPUnit_Framework_TestCase
22
+ {
23
+ private static $parser;
24
+
25
+ protected static function getVersionParser()
26
+ {
27
+ if (!self::$parser) {
28
+ self::$parser = new VersionParser();
29
+ }
30
+
31
+ return self::$parser;
32
+ }
33
+
34
+ protected function getVersionConstraint($operator, $version)
35
+ {
36
+ return new VersionConstraint(
37
+ $operator,
38
+ self::getVersionParser()->normalize($version)
39
+ );
40
+ }
41
+
42
+ protected function getPackage($name, $version)
43
+ {
44
+ $normVersion = self::getVersionParser()->normalize($version);
45
+
46
+ return new Package($name, $normVersion, $version);
47
+ }
48
+
49
+ protected function getAliasPackage($package, $version)
50
+ {
51
+ $normVersion = self::getVersionParser()->normalize($version);
52
+
53
+ return new AliasPackage($package, $normVersion, $version);
54
+ }
55
+
56
+ protected function ensureDirectoryExistsAndClear($directory)
57
+ {
58
+ $fs = new Filesystem();
59
+ if (is_dir($directory)) {
60
+ $fs->removeDirectory($directory);
61
+ }
62
+ mkdir($directory, 0777, true);
63
+ }
64
+ }
vendor/composer/installers/tests/bootstrap.php ADDED
@@ -0,0 +1,4 @@
 
 
 
 
1
+ <?php
2
+
3
+ $loader = require __DIR__ . '/../src/bootstrap.php';
4
+ $loader->add('Composer\Installers\Test', __DIR__);