Page Menu
Home
DevCentral
Search
Configure Global Search
Log In
Files
F24894200
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
2 KB
Referenced Files
None
Subscribers
None
View Options
diff --git a/workspaces/src/Engines/Apps/ApplicationConfiguration.php b/workspaces/src/Engines/Apps/ApplicationConfiguration.php
index b1263cb..12b8639 100644
--- a/workspaces/src/Engines/Apps/ApplicationConfiguration.php
+++ b/workspaces/src/Engines/Apps/ApplicationConfiguration.php
@@ -1,73 +1,81 @@
<?php
/**
* _, __, _, _ __, _ _, _, _
* / \ |_) (_ | | \ | /_\ |\ |
* \ / |_) , ) | |_/ | | | | \|
* ~ ~ ~ ~ ~ ~ ~ ~ ~ ~
*
* Application configuration class
*
* @package ObsidianWorkspaces
* @subpackage Apps
* @author Sébastien Santoro aka Dereckson <dereckson@espace-win.org>
* @license http://www.opensource.org/licenses/bsd-license.php BSD
* @filesource
*/
namespace Waystone\Workspaces\Engines\Apps;
use Waystone\Workspaces\Engines\Serialization\ArrayDeserializable;
use Message;
/**
* Application configuration class
*
* This class describes an application configuration.
*
* It can be serialized into a workspace.conf application entry
*/
class ApplicationConfiguration implements ArrayDeserializable {
/**
- * @var string The URL the application is binded to, without initial slash.
+ * @var string The URL the application is bound to, without an initial slash.
*/
- public $bind;
+ public string $bind;
/**
- * @var Message The navigation entry
+ * @var Message The navigation entry in the application menu.
*/
- public $nav;
+ public Message $nav;
/**
* @var string The application icon name
*/
- public $icon;
+ public string $icon;
/**
- * @var string[] The collections to use. Keys ares collections roles, values
- * collections names.
+ * @var string The application class name
+ *
+ * This must be a class name that extends Application
*/
- public $useCollections = [];
+ public string $name;
+
+ /**
+ * @var array<string,string> The collections to use.
+ * Keys are collections roles, values collections names.
+ */
+ public array $useCollections = [];
/**
* Loads an ApplicationConfiguration instance from an associative array
*
* @param array $data The associative array to deserialize
*
* @return ApplicationConfiguration The deserialized instance
*/
public static function loadFromArray (array $data) : self {
$instance = new static;
foreach ($data as $key => $value) {
$instance->$key = match ($key) {
"nav" => new Message($value),
default => $value,
};
}
return $instance;
}
+
}
File Metadata
Details
Attached
Mime Type
text/x-diff
Expires
Wed, Mar 18, 12:44 (1 d, 13 h)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
3531318
Default Alt Text
(2 KB)
Attached To
Mode
rOBSIDIAN Obsidian Workspaces
Attached
Detach File
Event Timeline
Log In to Comment