Skip to content

Commit

Permalink
Release version 2.5.0 (#9)
Browse files Browse the repository at this point in the history
Merge pull request #9 from short-pixel-optimizer/updates
  • Loading branch information
pdobrescu authored Feb 12, 2024
2 parents e53e1cc + 7d7bd15 commit 851c417
Show file tree
Hide file tree
Showing 61 changed files with 6,294 additions and 1,593 deletions.
12 changes: 6 additions & 6 deletions build/shortpixel/PackageLoader.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,14 +24,14 @@ public function getComposerFile($filePath = false )
return $this->composerFile;
}

public function load($dir)
public function load($dir, $prepend = false)
{
$this->dir = $dir;
$composer = $this->getComposerFile();


if(isset($composer["autoload"]["psr-4"])){
$this->loadPSR4($composer['autoload']['psr-4']);
$this->loadPSR4($composer['autoload']['psr-4'], $prepend);
}
if(isset($composer["autoload"]["psr-0"])){
$this->loadPSR0($composer['autoload']['psr-0']);
Expand All @@ -50,17 +50,17 @@ public function loadFiles($files){
}
}

public function loadPSR4($namespaces)
public function loadPSR4($namespaces, $prepend)
{
$this->loadPSR($namespaces, true);
$this->loadPSR($namespaces, true, $prepend);
}

public function loadPSR0($namespaces)
{
$this->loadPSR($namespaces, false);
}

public function loadPSR($namespaces, $psr4)
public function loadPSR($namespaces, $psr4, $prepend = false)
{
$dir = $this->dir;
// Foreach namespace specified in the composer, load the given classes
Expand Down Expand Up @@ -88,7 +88,7 @@ public function loadPSR($namespaces, $psr4)
}
}
}
});
}, true, $prepend);
}
}
}
2 changes: 1 addition & 1 deletion build/shortpixel/autoload.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?php
require_once (dirname(__FILE__) . "/PackageLoader.php");
require_once (__DIR__ . "/PackageLoader.php");
$loader = new ReThumbAdvanced\Build\PackageLoader();
$loader->load(__DIR__);

2 changes: 1 addition & 1 deletion build/shortpixel/composer.json
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"name":"ReThumbAdvanced\/shortpixelmodules","description":"ShortPixel submodules","type":"function","autoload":{"psr-4":{"ReThumbAdvanced\\ShortPixelLogger":"log\/src","ReThumbAdvanced\\Notices":"notices\/src","ReThumbAdvanced\\ShortQ":"shortq\/src"}}}
{"name":"ReThumbAdvanced\/shortpixelmodules","description":"ShortPixel submodules","type":"function","autoload":{"psr-4":{"ReThumbAdvanced\\ShortQ":"shortq\/src","ReThumbAdvanced\\Notices":"notices\/src","ReThumbAdvanced\\ShortPixelLogger":"log\/src","ReThumbAdvanced\\FileSystem":"filesystem\/src"}}}
18 changes: 18 additions & 0 deletions build/shortpixel/filesystem/composer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
{
"name": "shortpixel/filesystem",
"description": "ShortPixel FileSystem",
"version": 1.0,
"type": "library",
"license": "MIT",
"authors": [
{
"name": "Bas",
"email": "bas@weblogmechanic.com"
}
],
"minimum-stability": "dev",
"require": {},
"autoload": {
"psr-4": { "ShortPixel\\FileSystem\\" : "src" }
}
}
Loading

0 comments on commit 851c417

Please sign in to comment.