Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/3rdparty.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'scssphp/scssphp/scss.inc.php')
-rw-r--r--scssphp/scssphp/scss.inc.php21
1 files changed, 21 insertions, 0 deletions
diff --git a/scssphp/scssphp/scss.inc.php b/scssphp/scssphp/scss.inc.php
new file mode 100644
index 00000000..45983780
--- /dev/null
+++ b/scssphp/scssphp/scss.inc.php
@@ -0,0 +1,21 @@
+<?php
+
+if (version_compare(PHP_VERSION, '5.6') < 0) {
+ throw new \Exception('scssphp requires PHP 5.6 or above');
+}
+
+if (! class_exists('ScssPhp\ScssPhp\Version')) {
+ spl_autoload_register(function ($class) {
+ if (0 !== strpos($class, 'ScssPhp\ScssPhp\\')) {
+ // Not a ScssPhp class
+ return;
+ }
+
+ $subClass = substr($class, strlen('ScssPhp\ScssPhp\\'));
+ $path = __DIR__ . '/src/' . str_replace('\\', '/', $subClass) . '.php';
+
+ if (file_exists($path)) {
+ require $path;
+ }
+ });
+}