diff --git a/asset/api/favicon/apple-touch-icon.png b/asset/api/favicon/apple-touch-icon.png new file mode 100644 index 0000000..3bfce07 Binary files /dev/null and b/asset/api/favicon/apple-touch-icon.png differ diff --git a/asset/api/favicon/favicon-96x96.png b/asset/api/favicon/favicon-96x96.png new file mode 100644 index 0000000..9e1b3cd Binary files /dev/null and b/asset/api/favicon/favicon-96x96.png differ diff --git a/asset/api/favicon/favicon.ico b/asset/api/favicon/favicon.ico new file mode 100644 index 0000000..e2a7d3d Binary files /dev/null and b/asset/api/favicon/favicon.ico differ diff --git a/asset/api/favicon/favicon.svg b/asset/api/favicon/favicon.svg new file mode 100644 index 0000000..3698260 --- /dev/null +++ b/asset/api/favicon/favicon.svg @@ -0,0 +1,3 @@ + \ No newline at end of file diff --git a/asset/api/favicon/site.webmanifest b/asset/api/favicon/site.webmanifest new file mode 100644 index 0000000..d49d809 --- /dev/null +++ b/asset/api/favicon/site.webmanifest @@ -0,0 +1,21 @@ +{ + "name": "API", + "short_name": "API", + "icons": [ + { + "src": "/static/favicon/web-app-manifest-192x192.png", + "sizes": "192x192", + "type": "image/png", + "purpose": "maskable" + }, + { + "src": "/static/favicon/web-app-manifest-512x512.png", + "sizes": "512x512", + "type": "image/png", + "purpose": "maskable" + } + ], + "theme_color": "#ffffff", + "background_color": "#ffffff", + "display": "standalone" +} \ No newline at end of file diff --git a/asset/api/favicon/web-app-manifest-192x192.png b/asset/api/favicon/web-app-manifest-192x192.png new file mode 100644 index 0000000..102fde9 Binary files /dev/null and b/asset/api/favicon/web-app-manifest-192x192.png differ diff --git a/asset/api/favicon/web-app-manifest-512x512.png b/asset/api/favicon/web-app-manifest-512x512.png new file mode 100644 index 0000000..fa475f5 Binary files /dev/null and b/asset/api/favicon/web-app-manifest-512x512.png differ diff --git a/composer.json b/composer.json index b396bae..4aa66c5 100644 --- a/composer.json +++ b/composer.json @@ -38,8 +38,10 @@ "lean" : { "autoload": { "definitions" : [ + "meta/definitions/software.php" ], "config": [ + "meta/config.php" ] } } diff --git a/meta/config.php b/meta/config.php new file mode 100644 index 0000000..d46d5fc --- /dev/null +++ b/meta/config.php @@ -0,0 +1,9 @@ + [ + 'autoload' => [ + 'lean.api', + ] + ], +]; diff --git a/meta/definitions/software.php b/meta/definitions/software.php new file mode 100644 index 0000000..2f6862e --- /dev/null +++ b/meta/definitions/software.php @@ -0,0 +1,38 @@ + [ + 'picea' => [ + 'context' => Lean\Api\View::class, + + 'view' => [ + [ + 'path' => implode(DIRECTORY_SEPARATOR, [ $path , "view", '' ]), + 'order' => 99, + ], + ], + + 'asset' => [ + [ + 'path' => implode(DIRECTORY_SEPARATOR, [ $path, "asset", '' ]), + 'order' => 10 + ], + ], + ], + + 'tell' => [ + 'json' => [ + [ + 'path' => implode(DIRECTORY_SEPARATOR, [ $path, "meta", "i18n", "" ]), + 'order' => 99, + ], + ] + ], + + 'routes' => [ + 'Lean\\Api\\Controller' => implode(DIRECTORY_SEPARATOR, [ $path, "src", "Controller", "" ]), + ], + ], +]; \ No newline at end of file diff --git a/src/Attribute/EntityField.php b/src/Attribute/EntityField.php new file mode 100644 index 0000000..95e53c5 --- /dev/null +++ b/src/Attribute/EntityField.php @@ -0,0 +1,16 @@ +reflectClass()->getAttribute(Table::class); foreach($reflector->reflectProperties() as $property) { + $entityField = $property->getAttribute(EntityField::class); $field = $property->getAttribute(Field::class); if ($field) { @@ -87,7 +89,7 @@ class EntityDescriptor $propertyHtml .= sprintf( $this->entityField, $property->name, - $field->object->description, + $entityField->object->description ?? "", $field->object->name ?: $property->name, $field->tag, $field->object->type ?? implode(' | ', array_map(fn($e) => $e->type, $types)),