Skip to content

Commit

Permalink
🐛 load apiroutes
Browse files Browse the repository at this point in the history
Signed-off-by: bnomei <b@bnomei.com>
  • Loading branch information
bnomei committed Oct 12, 2023
1 parent b3309ff commit ee88690
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
6 changes: 3 additions & 3 deletions classes/Autoloader.php
Original file line number Diff line number Diff line change
Expand Up @@ -264,13 +264,13 @@ private function registry(string $type): array
// load blueprints from classes
foreach ($map as $class => $file) {
// if instance of class has static method registerBlueprintExtension
if (class_exists($class) && method_exists($class, 'registerBlueprintExtension')) {
if (class_exists($class) && method_exists($class, 'blueprintFromAttributes')) {
// register blueprints now, using and empty array would prevent the loading later
if (!array_key_exists('blueprints', $this->registry)) {
$this->registry['blueprints'] = $this->blueprints();
}
// call registerBlueprintExtension
$blueprint = $class::registerBlueprintExtension();
// call blueprintFromAttributes
$blueprint = $class::blueprintFromAttributes();
// if blueprint is not empty
if (!empty($blueprint)) {
// merge with existing blueprint
Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "bnomei/autoloader-for-kirby",
"type": "project",
"version": "1.10.2",
"version": "1.10.3",
"license": "MIT",
"description": "Helper to automatically load various Kirby extensions in a plugin",
"authors": [
Expand Down
8 changes: 4 additions & 4 deletions vendor/composer/installed.php
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<?php return array(
'root' => array(
'name' => 'bnomei/autoloader-for-kirby',
'pretty_version' => '1.10.2',
'version' => '1.10.2.0',
'pretty_version' => '1.10.3',
'version' => '1.10.3.0',
'reference' => NULL,
'type' => 'project',
'install_path' => __DIR__ . '/../../',
Expand All @@ -11,8 +11,8 @@
),
'versions' => array(
'bnomei/autoloader-for-kirby' => array(
'pretty_version' => '1.10.2',
'version' => '1.10.2.0',
'pretty_version' => '1.10.3',
'version' => '1.10.3.0',
'reference' => NULL,
'type' => 'project',
'install_path' => __DIR__ . '/../../',
Expand Down

0 comments on commit ee88690

Please sign in to comment.