orionis 0.583.0__py3-none-any.whl → 0.585.0__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,7 +1,7 @@
1
1
  from abc import abstractmethod
2
2
  from pathlib import Path
3
3
  from typing import Any, List, Type
4
- from orionis.console.base.scheduler import BaseScheduler
4
+ from orionis.console.contracts.base_scheduler import IBaseScheduler
5
5
  from orionis.failure.contracts.handler import IBaseExceptionHandler
6
6
  from orionis.foundation.config.roots.paths import Paths
7
7
  from orionis.container.contracts.service_provider import IServiceProvider
@@ -29,71 +29,76 @@ class IApplication(IContainer):
29
29
  bootstrap operations.
30
30
  """
31
31
 
32
- @property
33
32
  @abstractmethod
34
- def isBooted(self) -> bool:
35
- """
36
- Check if the application has completed its bootstrap process.
37
-
38
- Returns
39
- -------
40
- bool
41
- True if the application has been successfully booted and is ready
42
- for operation, False otherwise.
43
- """
44
- pass
45
-
46
- @property
47
- @abstractmethod
48
- def startAt(self) -> int:
49
- """
50
- Get the application startup timestamp.
51
-
52
- Returns
53
- -------
54
- int
55
- The Unix timestamp representing when the application was started.
56
- """
57
- pass
58
-
59
- @abstractmethod
60
- def withProviders(self, providers: List[Type[IServiceProvider]] = []) -> 'IApplication':
33
+ def withProviders(
34
+ self,
35
+ providers: List[Type[IServiceProvider]] = []
36
+ ) -> 'IApplication':
61
37
  """
62
38
  Register multiple service providers with the application.
63
39
 
40
+ This method provides a convenient way to add multiple service provider
41
+ classes to the application in a single call. Each provider in the list
42
+ will be validated and added to the internal providers collection.
43
+
64
44
  Parameters
65
45
  ----------
66
46
  providers : List[Type[IServiceProvider]], optional
67
- A list of service provider classes to register. Each provider will
68
- be instantiated and registered with the application container.
69
- Defaults to an empty list.
47
+ A list of service provider classes that implement IServiceProvider
48
+ interface. Each provider will be added to the application's provider
49
+ registry. Default is an empty list.
70
50
 
71
51
  Returns
72
52
  -------
73
- IApplication
74
- The application instance to enable method chaining.
53
+ Application
54
+ The current application instance to enable method chaining.
55
+
56
+ Notes
57
+ -----
58
+ This method iterates through the provided list and calls addProvider()
59
+ for each provider class, which performs individual validation and
60
+ registration.
75
61
  """
76
62
  pass
77
63
 
78
64
  @abstractmethod
79
- def addProvider(self, provider: Type[IServiceProvider]) -> 'IApplication':
65
+ def addProvider(
66
+ self,
67
+ provider: Type[IServiceProvider]
68
+ ) -> 'IApplication':
80
69
  """
81
70
  Register a single service provider with the application.
82
71
 
72
+ This method validates and adds a service provider class to the application's
73
+ provider registry. The provider must implement the IServiceProvider interface
74
+ and will be checked for duplicates before registration.
75
+
83
76
  Parameters
84
77
  ----------
85
78
  provider : Type[IServiceProvider]
86
- The service provider class to register with the application.
87
- The provider will be instantiated and its services bound to
88
- the container.
79
+ A service provider class that implements the IServiceProvider interface.
80
+ The class will be instantiated and registered during the application
81
+ bootstrap process.
89
82
 
90
83
  Returns
91
84
  -------
92
- IApplication
93
- The application instance to enable method chaining.
85
+ Application
86
+ The current application instance to enable method chaining.
87
+
88
+ Raises
89
+ ------
90
+ OrionisTypeError
91
+ If the provider parameter is not a class type or does not implement
92
+ the IServiceProvider interface, or if the provider is already registered.
93
+
94
+ Notes
95
+ -----
96
+ Providers are stored as class references and will be instantiated during
97
+ the registration phase of the application bootstrap process.
94
98
  """
95
99
  pass
96
100
 
101
+ @abstractmethod
97
102
  def setExceptionHandler(
98
103
  self,
99
104
  handler: IBaseExceptionHandler
@@ -102,16 +107,16 @@ class IApplication(IContainer):
102
107
  Register a custom exception handler class for the application.
103
108
 
104
109
  This method allows you to specify a custom exception handler class that
105
- inherits from BaseHandlerException. The handler class will be used to
110
+ inherits from BaseExceptionHandler. The handler class will be used to
106
111
  manage exceptions raised within the application, including reporting and
107
112
  rendering error messages. The provided handler must be a class (not an
108
- instance) and must inherit from BaseHandlerException.
113
+ instance) and must inherit from BaseExceptionHandler.
109
114
 
110
115
  Parameters
111
116
  ----------
112
- handler : Type[BaseHandlerException]
117
+ handler : Type[BaseExceptionHandler]
113
118
  The exception handler class to be used by the application. Must be a
114
- subclass of BaseHandlerException.
119
+ subclass of BaseExceptionHandler.
115
120
 
116
121
  Returns
117
122
  -------
@@ -121,7 +126,7 @@ class IApplication(IContainer):
121
126
  Raises
122
127
  ------
123
128
  OrionisTypeError
124
- If the provided handler is not a class or is not a subclass of BaseHandlerException.
129
+ If the provided handler is not a class or is not a subclass of BaseExceptionHandler.
125
130
 
126
131
  Notes
127
132
  -----
@@ -130,6 +135,7 @@ class IApplication(IContainer):
130
135
  """
131
136
  pass
132
137
 
138
+ @abstractmethod
133
139
  def getExceptionHandler(
134
140
  self
135
141
  ) -> IBaseExceptionHandler:
@@ -138,15 +144,15 @@ class IApplication(IContainer):
138
144
 
139
145
  This method returns an instance of the exception handler that has been set using
140
146
  the `setExceptionHandler` method. If no custom handler has been set, it returns
141
- a default `BaseHandlerException` instance. The returned object is responsible
147
+ a default `BaseExceptionHandler` instance. The returned object is responsible
142
148
  for handling exceptions within the application, including reporting and rendering
143
149
  error messages.
144
150
 
145
151
  Returns
146
152
  -------
147
- BaseHandlerException
153
+ BaseExceptionHandler
148
154
  An instance of the currently registered exception handler. If no handler
149
- has been set, returns a default `BaseHandlerException` instance.
155
+ has been set, returns a default `BaseExceptionHandler` instance.
150
156
 
151
157
  Notes
152
158
  -----
@@ -159,7 +165,7 @@ class IApplication(IContainer):
159
165
  @abstractmethod
160
166
  def setScheduler(
161
167
  self,
162
- scheduler: BaseScheduler
168
+ scheduler: IBaseScheduler
163
169
  ) -> 'IApplication':
164
170
  """
165
171
  Register a custom scheduler class for the application.
@@ -196,7 +202,7 @@ class IApplication(IContainer):
196
202
  @abstractmethod
197
203
  def getScheduler(
198
204
  self
199
- ) -> BaseScheduler:
205
+ ) -> IBaseScheduler:
200
206
  """
201
207
  Retrieve the currently registered scheduler instance.
202
208
 
@@ -233,675 +239,1010 @@ class IApplication(IContainer):
233
239
  testing : Testing | dict = Testing()
234
240
  ) -> 'IApplication':
235
241
  """
236
- Configure the application with multiple service configuration objects.
242
+ Configure the application with comprehensive service configuration objects.
237
243
 
238
- This method allows comprehensive configuration of various application
239
- services by providing configuration objects or dictionaries for each
240
- service type. All parameters are keyword-only to prevent positional
241
- argument confusion.
244
+ This method provides a centralized way to configure all major application
245
+ subsystems using either configuration entity instances or dictionary objects.
246
+ Each configurator manages settings for a specific aspect of the application
247
+ such as authentication, caching, database connectivity, logging, and more.
242
248
 
243
249
  Parameters
244
250
  ----------
245
- app : App | dict, optional
246
- Application-level configuration settings.
247
- auth : Auth | dict, optional
248
- Authentication service configuration.
249
- cache : Cache | dict, optional
250
- Caching service configuration.
251
- cors : Cors | dict, optional
252
- Cross-Origin Resource Sharing configuration.
253
- database : Database | dict, optional
254
- Database connection and settings configuration.
255
- filesystems : Filesystems | dict, optional
256
- File storage and filesystem configuration.
257
- logging : Logging | dict, optional
258
- Logging service configuration.
259
- mail : Mail | dict, optional
260
- Email service configuration.
261
- path : Paths | dict, optional
262
- Application directory paths configuration.
263
- queue : Queue | dict, optional
264
- Job queue service configuration.
265
- session : Session | dict, optional
266
- Session management configuration.
267
- testing : Testing | dict, optional
268
- Testing environment configuration.
251
+ app : App or dict, optional
252
+ Application-level configuration including name, environment, debug settings,
253
+ and URL configuration. Default creates a new App() instance.
254
+ auth : Auth or dict, optional
255
+ Authentication system configuration including guards, providers, and
256
+ password settings. Default creates a new Auth() instance.
257
+ cache : Cache or dict, optional
258
+ Caching system configuration including default store, prefix settings,
259
+ and driver-specific options. Default creates a new Cache() instance.
260
+ cors : Cors or dict, optional
261
+ Cross-Origin Resource Sharing configuration including allowed origins,
262
+ methods, and headers. Default creates a new Cors() instance.
263
+ database : Database or dict, optional
264
+ Database connectivity configuration including default connection, migration
265
+ settings, and connection definitions. Default creates a new Database() instance.
266
+ filesystems : Filesystems or dict, optional
267
+ File storage system configuration including default disk, cloud storage
268
+ settings, and disk definitions. Default creates a new Filesystems() instance.
269
+ logging : Logging or dict, optional
270
+ Logging system configuration including default channel, log levels,
271
+ and channel definitions. Default creates a new Logging() instance.
272
+ mail : Mail or dict, optional
273
+ Email system configuration including default mailer, transport settings,
274
+ and mailer definitions. Default creates a new Mail() instance.
275
+ path : Paths or dict, optional
276
+ Application path configuration including directories for controllers,
277
+ models, views, and other application components. Default creates a new Paths() instance.
278
+ queue : Queue or dict, optional
279
+ Queue system configuration including default connection, worker settings,
280
+ and connection definitions. Default creates a new Queue() instance.
281
+ session : Session or dict, optional
282
+ Session management configuration including driver, lifetime, encryption,
283
+ and storage settings. Default creates a new Session() instance.
284
+ testing : Testing or dict, optional
285
+ Testing framework configuration including database settings, environment
286
+ variables, and test-specific options. Default creates a new Testing() instance.
269
287
 
270
288
  Returns
271
289
  -------
272
- IApplication
273
- The application instance to enable method chaining.
274
- """
275
- pass
276
-
277
- @abstractmethod
278
- def setConfigApp(self, **app_config) -> 'IApplication':
279
- """
280
- Configure application settings using keyword arguments.
290
+ Application
291
+ The current application instance to enable method chaining.
281
292
 
282
- Parameters
283
- ----------
284
- **app_config
285
- Arbitrary keyword arguments representing application configuration
286
- settings. Keys should match the expected application configuration
287
- parameter names.
293
+ Raises
294
+ ------
295
+ OrionisTypeError
296
+ If any configurator parameter is not an instance of its expected type
297
+ or a dictionary that can be converted to the expected type.
288
298
 
289
- Returns
290
- -------
291
- IApplication
292
- The application instance to enable method chaining.
299
+ Notes
300
+ -----
301
+ Each configurator is validated for type correctness and then passed to its
302
+ corresponding load method for processing and storage in the application's
303
+ configuration system.
293
304
  """
294
305
  pass
295
306
 
296
307
  @abstractmethod
297
- def loadConfigApp(self, app: App | dict) -> 'IApplication':
308
+ def setConfigApp(
309
+ self,
310
+ **app_config
311
+ ) -> 'IApplication':
298
312
  """
299
- Load application configuration from a configuration object or dictionary.
313
+ Configure the application using keyword arguments.
314
+
315
+ This method provides a convenient way to set application configuration
316
+ by passing individual configuration parameters as keyword arguments.
317
+ The parameters are used to create an App configuration instance.
300
318
 
301
319
  Parameters
302
320
  ----------
303
- app : App | dict
304
- An App configuration object or dictionary containing application
305
- settings to be loaded into the application.
321
+ **app_config : dict
322
+ Configuration parameters for the application. These must match the
323
+ field names and types expected by the App dataclass from
324
+ orionis.foundation.config.app.entities.app.App.
306
325
 
307
326
  Returns
308
327
  -------
309
- IApplication
310
- The application instance to enable method chaining.
328
+ Application
329
+ The current application instance to enable method chaining.
330
+
331
+ Notes
332
+ -----
333
+ This method internally creates an App instance from the provided keyword
334
+ arguments and then calls loadConfigApp() to store the configuration.
311
335
  """
312
336
  pass
313
337
 
314
338
  @abstractmethod
315
- def setConfigAuth(self, **auth_config) -> 'IApplication':
339
+ def loadConfigApp(
340
+ self,
341
+ app: App | dict
342
+ ) -> 'IApplication':
316
343
  """
317
- Configure authentication settings using keyword arguments.
344
+ Load and store application configuration from an App instance or dictionary.
345
+
346
+ This method validates and stores the application configuration in the
347
+ internal configurators storage. If a dictionary is provided, it will
348
+ be converted to an App instance before storage.
318
349
 
319
350
  Parameters
320
351
  ----------
321
- **auth_config
322
- Arbitrary keyword arguments representing authentication configuration
323
- settings. Keys should match the expected authentication parameter names.
352
+ app : App or dict
353
+ The application configuration as either an App instance or a dictionary
354
+ containing configuration parameters that can be used to construct an
355
+ App instance.
324
356
 
325
357
  Returns
326
358
  -------
327
- IApplication
328
- The application instance to enable method chaining.
359
+ Application
360
+ The current application instance to enable method chaining.
361
+
362
+ Raises
363
+ ------
364
+ OrionisTypeError
365
+ If the app parameter is not an instance of App or a dictionary.
366
+
367
+ Notes
368
+ -----
369
+ Dictionary inputs are automatically converted to App instances using
370
+ the dictionary unpacking operator (**app).
329
371
  """
330
372
  pass
331
373
 
332
374
  @abstractmethod
333
- def loadConfigAuth(self, auth: Auth | dict) -> 'IApplication':
375
+ def setConfigAuth(
376
+ self,
377
+ **auth_config
378
+ ) -> 'IApplication':
334
379
  """
335
- Load authentication configuration from a configuration object or dictionary.
380
+ Configure the authentication system using keyword arguments.
381
+
382
+ This method provides a convenient way to set authentication configuration
383
+ by passing individual configuration parameters as keyword arguments.
384
+ The parameters are used to create an Auth configuration instance.
336
385
 
337
386
  Parameters
338
387
  ----------
339
- auth : Auth | dict
340
- An Auth configuration object or dictionary containing authentication
341
- settings to be loaded into the application.
388
+ **auth_config : dict
389
+ Configuration parameters for authentication. These must match the
390
+ field names and types expected by the Auth dataclass from
391
+ orionis.foundation.config.auth.entities.auth.Auth.
342
392
 
343
393
  Returns
344
394
  -------
345
- IApplication
346
- The application instance to enable method chaining.
395
+ Application
396
+ The current application instance to enable method chaining.
397
+
398
+ Notes
399
+ -----
400
+ This method internally creates an Auth instance from the provided keyword
401
+ arguments and then calls loadConfigAuth() to store the configuration.
347
402
  """
348
403
  pass
349
404
 
350
405
  @abstractmethod
351
- def setConfigCache(self, **cache_config) -> 'IApplication':
406
+ def loadConfigAuth(
407
+ self,
408
+ auth: Auth | dict
409
+ ) -> 'IApplication':
352
410
  """
353
- Configure cache settings using keyword arguments.
411
+ Load and store authentication configuration from an Auth instance or dictionary.
412
+
413
+ This method validates and stores the authentication configuration in the
414
+ internal configurators storage. If a dictionary is provided, it will
415
+ be converted to an Auth instance before storage.
354
416
 
355
417
  Parameters
356
418
  ----------
357
- **cache_config
358
- Arbitrary keyword arguments representing cache configuration
359
- settings. Keys should match the expected cache parameter names.
419
+ auth : Auth or dict
420
+ The authentication configuration as either an Auth instance or a dictionary
421
+ containing configuration parameters that can be used to construct an
422
+ Auth instance.
360
423
 
361
424
  Returns
362
425
  -------
363
- IApplication
364
- The application instance to enable method chaining.
426
+ Application
427
+ The current application instance to enable method chaining.
428
+
429
+ Raises
430
+ ------
431
+ OrionisTypeError
432
+ If the auth parameter is not an instance of Auth or a dictionary.
433
+
434
+ Notes
435
+ -----
436
+ Dictionary inputs are automatically converted to Auth instances using
437
+ the dictionary unpacking operator (**auth).
365
438
  """
366
439
  pass
367
440
 
368
441
  @abstractmethod
369
- def loadConfigCache(self, cache: Cache | dict) -> 'IApplication':
442
+ def setConfigCache(
443
+ self,
444
+ **cache_config
445
+ ) -> 'IApplication':
370
446
  """
371
- Load cache configuration from a configuration object or dictionary.
447
+ Configure the cache system using keyword arguments.
448
+
449
+ This method provides a convenient way to set cache configuration by
450
+ passing individual configuration parameters as keyword arguments.
451
+ The parameters are used to create a Cache configuration instance.
372
452
 
373
453
  Parameters
374
454
  ----------
375
- cache : Cache | dict
376
- A Cache configuration object or dictionary containing cache
377
- settings to be loaded into the application.
455
+ **cache_config : dict
456
+ Configuration parameters for the cache system. These must match the
457
+ field names and types expected by the Cache dataclass from
458
+ orionis.foundation.config.cache.entities.cache.Cache.
378
459
 
379
460
  Returns
380
461
  -------
381
- IApplication
382
- The application instance to enable method chaining.
462
+ Application
463
+ The current application instance to enable method chaining.
464
+
465
+ Notes
466
+ -----
467
+ This method internally creates a Cache instance from the provided keyword
468
+ arguments and then calls loadConfigCache() to store the configuration.
383
469
  """
384
470
  pass
385
471
 
386
472
  @abstractmethod
387
- def setConfigCors(self, **cors_config) -> 'IApplication':
473
+ def loadConfigCache(
474
+ self,
475
+ cache: Cache | dict
476
+ ) -> 'IApplication':
388
477
  """
389
- Configure CORS settings using keyword arguments.
478
+ Load and store cache configuration from a Cache instance or dictionary.
479
+
480
+ This method validates and stores the cache configuration in the
481
+ internal configurators storage. If a dictionary is provided, it will
482
+ be converted to a Cache instance before storage.
390
483
 
391
484
  Parameters
392
485
  ----------
393
- **cors_config
394
- Arbitrary keyword arguments representing Cross-Origin Resource Sharing
395
- configuration settings. Keys should match the expected CORS parameter names.
486
+ cache : Cache or dict
487
+ The cache configuration as either a Cache instance or a dictionary
488
+ containing configuration parameters that can be used to construct a
489
+ Cache instance.
396
490
 
397
491
  Returns
398
492
  -------
399
- IApplication
400
- The application instance to enable method chaining.
493
+ Application
494
+ The current application instance to enable method chaining.
495
+
496
+ Raises
497
+ ------
498
+ OrionisTypeError
499
+ If the cache parameter is not an instance of Cache or a dictionary.
500
+
501
+ Notes
502
+ -----
503
+ Dictionary inputs are automatically converted to Cache instances using
504
+ the dictionary unpacking operator (**cache).
401
505
  """
402
506
  pass
403
507
 
404
508
  @abstractmethod
405
- def loadConfigCors(self, cors: Cors | dict) -> 'IApplication':
509
+ def setConfigCors(
510
+ self,
511
+ **cors_config
512
+ ) -> 'IApplication':
406
513
  """
407
- Load CORS configuration from a configuration object or dictionary.
514
+ Configure the CORS (Cross-Origin Resource Sharing) system using keyword arguments.
515
+
516
+ This method provides a convenient way to set CORS configuration by
517
+ passing individual configuration parameters as keyword arguments.
518
+ The parameters are used to create a Cors configuration instance.
408
519
 
409
520
  Parameters
410
521
  ----------
411
- cors : Cors | dict
412
- A Cors configuration object or dictionary containing CORS
413
- settings to be loaded into the application.
522
+ **cors_config : dict
523
+ Configuration parameters for CORS settings. These must match the
524
+ field names and types expected by the Cors dataclass from
525
+ orionis.foundation.config.cors.entities.cors.Cors.
414
526
 
415
527
  Returns
416
528
  -------
417
- IApplication
418
- The application instance to enable method chaining.
529
+ Application
530
+ The current application instance to enable method chaining.
531
+
532
+ Notes
533
+ -----
534
+ This method internally creates a Cors instance from the provided keyword
535
+ arguments and then calls loadConfigCors() to store the configuration.
419
536
  """
420
537
  pass
421
538
 
422
539
  @abstractmethod
423
- def setConfigDatabase(self, **database_config) -> 'IApplication':
540
+ def loadConfigCors(
541
+ self,
542
+ cors: Cors | dict
543
+ ) -> 'IApplication':
424
544
  """
425
- Configure database settings using keyword arguments.
545
+ Load and store CORS configuration from a Cors instance or dictionary.
546
+
547
+ This method validates and stores the CORS (Cross-Origin Resource Sharing)
548
+ configuration in the internal configurators storage. If a dictionary is
549
+ provided, it will be converted to a Cors instance before storage.
426
550
 
427
551
  Parameters
428
552
  ----------
429
- **database_config
430
- Arbitrary keyword arguments representing database configuration
431
- settings. Keys should match the expected database parameter names.
553
+ cors : Cors or dict
554
+ The CORS configuration as either a Cors instance or a dictionary
555
+ containing configuration parameters that can be used to construct a
556
+ Cors instance.
432
557
 
433
558
  Returns
434
559
  -------
435
- IApplication
436
- The application instance to enable method chaining.
560
+ Application
561
+ The current application instance to enable method chaining.
562
+
563
+ Raises
564
+ ------
565
+ OrionisTypeError
566
+ If the cors parameter is not an instance of Cors or a dictionary.
567
+
568
+ Notes
569
+ -----
570
+ Dictionary inputs are automatically converted to Cors instances using
571
+ the dictionary unpacking operator (**cors).
437
572
  """
438
573
  pass
439
574
 
440
575
  @abstractmethod
441
- def loadConfigDatabase(self, database: Database | dict) -> 'IApplication':
576
+ def setConfigDatabase(
577
+ self,
578
+ **database_config
579
+ ) -> 'IApplication':
442
580
  """
443
- Load database configuration from a configuration object or dictionary.
581
+ Configure the database system using keyword arguments.
582
+
583
+ This method provides a convenient way to set database configuration by
584
+ passing individual configuration parameters as keyword arguments.
585
+ The parameters are used to create a Database configuration instance.
444
586
 
445
587
  Parameters
446
588
  ----------
447
- database : Database | dict
448
- A Database configuration object or dictionary containing database
449
- connection and settings to be loaded into the application.
589
+ **database_config : dict
590
+ Configuration parameters for the database system. These must match the
591
+ field names and types expected by the Database dataclass from
592
+ orionis.foundation.config.database.entities.database.Database.
450
593
 
451
594
  Returns
452
595
  -------
453
- IApplication
454
- The application instance to enable method chaining.
596
+ Application
597
+ The current application instance to enable method chaining.
598
+
599
+ Notes
600
+ -----
601
+ This method internally creates a Database instance from the provided keyword
602
+ arguments and then calls loadConfigDatabase() to store the configuration.
455
603
  """
456
604
  pass
457
605
 
458
606
  @abstractmethod
459
- def setConfigFilesystems(self, **filesystems_config) -> 'IApplication':
607
+ def loadConfigDatabase(
608
+ self,
609
+ database: Database | dict
610
+ ) -> 'IApplication':
460
611
  """
461
- Configure filesystem settings using keyword arguments.
612
+ Load and store database configuration from a Database instance or dictionary.
613
+
614
+ This method validates and stores the database configuration in the
615
+ internal configurators storage. If a dictionary is provided, it will
616
+ be converted to a Database instance before storage.
462
617
 
463
618
  Parameters
464
619
  ----------
465
- **filesystems_config
466
- Arbitrary keyword arguments representing filesystem configuration
467
- settings. Keys should match the expected filesystem parameter names.
620
+ database : Database or dict
621
+ The database configuration as either a Database instance or a dictionary
622
+ containing configuration parameters that can be used to construct a
623
+ Database instance.
468
624
 
469
625
  Returns
470
626
  -------
471
- IApplication
472
- The application instance to enable method chaining.
627
+ Application
628
+ The current application instance to enable method chaining.
629
+
630
+ Raises
631
+ ------
632
+ OrionisTypeError
633
+ If the database parameter is not an instance of Database or a dictionary.
634
+
635
+ Notes
636
+ -----
637
+ Dictionary inputs are automatically converted to Database instances using
638
+ the dictionary unpacking operator (**database).
473
639
  """
474
640
  pass
475
641
 
476
642
  @abstractmethod
477
- def loadConfigFilesystems(self, filesystems: Filesystems | dict) -> 'IApplication':
643
+ def setConfigFilesystems(
644
+ self,
645
+ **filesystems_config
646
+ ) -> 'IApplication':
478
647
  """
479
- Load filesystem configuration from a configuration object or dictionary.
648
+ Configure the filesystems using keyword arguments.
649
+
650
+ This method provides a convenient way to set filesystem configuration by
651
+ passing individual configuration parameters as keyword arguments.
652
+ The parameters are used to create a Filesystems configuration instance.
480
653
 
481
654
  Parameters
482
655
  ----------
483
- filesystems : Filesystems | dict
484
- A Filesystems configuration object or dictionary containing filesystem
485
- settings to be loaded into the application.
656
+ **filesystems_config : dict
657
+ Configuration parameters for the filesystems. These must match the
658
+ field names and types expected by the Filesystems dataclass from
659
+ orionis.foundation.config.filesystems.entitites.filesystems.Filesystems.
486
660
 
487
661
  Returns
488
662
  -------
489
- IApplication
490
- The application instance to enable method chaining.
663
+ Application
664
+ The current application instance to enable method chaining.
665
+
666
+ Notes
667
+ -----
668
+ This method internally creates a Filesystems instance from the provided keyword
669
+ arguments and then calls loadConfigFilesystems() to store the configuration.
491
670
  """
492
671
  pass
493
672
 
494
673
  @abstractmethod
495
- def setConfigLogging(self, **logging_config) -> 'IApplication':
674
+ def loadConfigFilesystems(
675
+ self,
676
+ filesystems: Filesystems | dict
677
+ ) -> 'IApplication':
496
678
  """
497
- Configure logging settings using keyword arguments.
679
+ Load and store filesystems configuration from a Filesystems instance or dictionary.
680
+
681
+ This method validates and stores the filesystems configuration in the
682
+ internal configurators storage. If a dictionary is provided, it will
683
+ be converted to a Filesystems instance before storage.
498
684
 
499
685
  Parameters
500
686
  ----------
501
- **logging_config
502
- Arbitrary keyword arguments representing logging configuration
503
- settings. Keys should match the expected logging parameter names.
687
+ filesystems : Filesystems or dict
688
+ The filesystems configuration as either a Filesystems instance or a dictionary
689
+ containing configuration parameters that can be used to construct a
690
+ Filesystems instance.
504
691
 
505
692
  Returns
506
693
  -------
507
- IApplication
508
- The application instance to enable method chaining.
694
+ Application
695
+ The current application instance to enable method chaining.
696
+
697
+ Raises
698
+ ------
699
+ OrionisTypeError
700
+ If the filesystems parameter is not an instance of Filesystems or a dictionary.
701
+
702
+ Notes
703
+ -----
704
+ Dictionary inputs are automatically converted to Filesystems instances using
705
+ the dictionary unpacking operator (**filesystems).
509
706
  """
510
707
  pass
511
708
 
512
709
  @abstractmethod
513
- def loadConfigLogging(self, logging: Logging | dict) -> 'IApplication':
710
+ def setConfigLogging(
711
+ self,
712
+ **logging_config
713
+ ) -> 'IApplication':
514
714
  """
515
- Load logging configuration from a configuration object or dictionary.
715
+ Configure the logging system using keyword arguments.
716
+
717
+ This method provides a convenient way to set logging configuration by
718
+ passing individual configuration parameters as keyword arguments.
719
+ The parameters are used to create a Logging configuration instance.
516
720
 
517
721
  Parameters
518
722
  ----------
519
- logging : Logging | dict
520
- A Logging configuration object or dictionary containing logging
521
- settings to be loaded into the application.
723
+ **logging_config : dict
724
+ Configuration parameters for the logging system. These must match the
725
+ field names and types expected by the Logging dataclass from
726
+ orionis.foundation.config.logging.entities.logging.Logging.
522
727
 
523
728
  Returns
524
729
  -------
525
- IApplication
526
- The application instance to enable method chaining.
730
+ Application
731
+ The current application instance to enable method chaining.
732
+
733
+ Notes
734
+ -----
735
+ This method internally creates a Logging instance from the provided keyword
736
+ arguments and then calls loadConfigLogging() to store the configuration.
527
737
  """
528
738
  pass
529
739
 
530
740
  @abstractmethod
531
- def setConfigMail(self, **mail_config) -> 'IApplication':
741
+ def loadConfigLogging(
742
+ self,
743
+ logging: Logging | dict
744
+ ) -> 'IApplication':
532
745
  """
533
- Configure mail service settings using keyword arguments.
746
+ Load and store logging configuration from a Logging instance or dictionary.
747
+
748
+ This method validates and stores the logging configuration in the
749
+ internal configurators storage. If a dictionary is provided, it will
750
+ be converted to a Logging instance before storage.
534
751
 
535
752
  Parameters
536
753
  ----------
537
- **mail_config
538
- Arbitrary keyword arguments representing mail service configuration
539
- settings. Keys should match the expected mail parameter names.
754
+ logging : Logging or dict
755
+ The logging configuration as either a Logging instance or a dictionary
756
+ containing configuration parameters that can be used to construct a
757
+ Logging instance.
540
758
 
541
759
  Returns
542
760
  -------
543
- IApplication
544
- The application instance to enable method chaining.
761
+ Application
762
+ The current application instance to enable method chaining.
763
+
764
+ Raises
765
+ ------
766
+ OrionisTypeError
767
+ If the logging parameter is not an instance of Logging or a dictionary.
768
+
769
+ Notes
770
+ -----
771
+ Dictionary inputs are automatically converted to Logging instances using
772
+ the dictionary unpacking operator (**logging).
545
773
  """
546
774
  pass
547
775
 
548
776
  @abstractmethod
549
- def loadConfigMail(self, mail: Mail | dict) -> 'IApplication':
777
+ def setConfigMail(
778
+ self,
779
+ **mail_config
780
+ ) -> 'IApplication':
550
781
  """
551
- Load mail configuration from a configuration object or dictionary.
782
+ Configure the mail system using keyword arguments.
783
+
784
+ This method provides a convenient way to set mail configuration by
785
+ passing individual configuration parameters as keyword arguments.
786
+ The parameters are used to create a Mail configuration instance.
552
787
 
553
788
  Parameters
554
789
  ----------
555
- mail : Mail | dict
556
- A Mail configuration object or dictionary containing mail service
557
- settings to be loaded into the application.
790
+ **mail_config : dict
791
+ Configuration parameters for the mail system. These must match the
792
+ field names and types expected by the Mail dataclass from
793
+ orionis.foundation.config.mail.entities.mail.Mail.
558
794
 
559
795
  Returns
560
796
  -------
561
- IApplication
562
- The application instance to enable method chaining.
797
+ Application
798
+ The current application instance to enable method chaining.
799
+
800
+ Notes
801
+ -----
802
+ This method internally creates a Mail instance from the provided keyword
803
+ arguments and then calls loadConfigMail() to store the configuration.
563
804
  """
564
805
  pass
565
806
 
566
807
  @abstractmethod
567
- def setPaths(
808
+ def loadConfigMail(
568
809
  self,
569
- *,
570
- root: str | Path = Path.cwd().resolve(),
571
- commands: str | Path = (Path.cwd() / 'app' / 'console' / 'commands').resolve(),
572
- controllers: str | Path = (Path.cwd() / 'app' / 'http' / 'controllers').resolve(),
573
- middleware: str | Path = (Path.cwd() / 'app' / 'http' / 'middleware').resolve(),
574
- requests: str | Path = (Path.cwd() / 'app' / 'http' / 'requests').resolve(),
575
- models: str | Path = (Path.cwd() / 'app' / 'models').resolve(),
576
- providers: str | Path = (Path.cwd() / 'app' / 'providers').resolve(),
577
- events: str | Path = (Path.cwd() / 'app' / 'events').resolve(),
578
- listeners: str | Path = (Path.cwd() / 'app' / 'listeners').resolve(),
579
- notifications: str | Path = (Path.cwd() / 'app' / 'notifications').resolve(),
580
- jobs: str | Path = (Path.cwd() / 'app' / 'jobs').resolve(),
581
- policies: str | Path = (Path.cwd() / 'app' / 'policies').resolve(),
582
- exceptions: str | Path = (Path.cwd() / 'app' / 'exceptions').resolve(),
583
- services: str | Path = (Path.cwd() / 'app' / 'services').resolve(),
584
- views: str | Path = (Path.cwd() / 'resources' / 'views').resolve(),
585
- lang: str | Path = (Path.cwd() / 'resources' / 'lang').resolve(),
586
- assets: str | Path = (Path.cwd() / 'resources' / 'assets').resolve(),
587
- routes: str | Path = (Path.cwd() / 'routes').resolve(),
588
- config: str | Path = (Path.cwd() / 'config').resolve(),
589
- migrations: str | Path = (Path.cwd() / 'database' / 'migrations').resolve(),
590
- seeders: str | Path = (Path.cwd() / 'database' / 'seeders').resolve(),
591
- factories: str | Path = (Path.cwd() / 'database' / 'factories').resolve(),
592
- logs: str | Path = (Path.cwd() / 'storage' / 'logs').resolve(),
593
- sessions: str | Path = (Path.cwd() / 'storage' / 'framework' / 'sessions').resolve(),
594
- cache: str | Path = (Path.cwd() / 'storage' / 'framework' / 'cache').resolve(),
595
- testing: str | Path = (Path.cwd() / 'storage' / 'framework' / 'testing').resolve(),
596
- storage: str | Path = (Path.cwd() / 'storage').resolve()
810
+ mail: Mail | dict
597
811
  ) -> 'IApplication':
598
812
  """
599
- Set and resolve application directory paths using keyword arguments.
813
+ Load and store mail configuration from a Mail instance or dictionary.
600
814
 
601
- This method allows customization of all major application directory paths, such as
602
- console components, HTTP components, application layers, resources, routes,
603
- database files, and storage locations. All provided paths are resolved to absolute
604
- paths and stored as strings in the configuration dictionary.
815
+ This method validates and stores the mail configuration in the
816
+ internal configurators storage. If a dictionary is provided, it will
817
+ be converted to a Mail instance before storage.
605
818
 
606
819
  Parameters
607
820
  ----------
608
- root : str or Path, optional
609
- Root directory of the application. Defaults to the current working directory.
610
- commands : str or Path, optional
611
- Directory for console command classes. Defaults to 'app/console/commands'.
612
- controllers : str or Path, optional
613
- Directory for HTTP controller classes. Defaults to 'app/http/controllers'.
614
- middleware : str or Path, optional
615
- Directory for HTTP middleware classes. Defaults to 'app/http/middleware'.
616
- requests : str or Path, optional
617
- Directory for HTTP request classes. Defaults to 'app/http/requests'.
618
- models : str or Path, optional
619
- Directory for data model classes. Defaults to 'app/models'.
620
- providers : str or Path, optional
621
- Directory for service provider classes. Defaults to 'app/providers'.
622
- events : str or Path, optional
623
- Directory for event classes. Defaults to 'app/events'.
624
- listeners : str or Path, optional
625
- Directory for event listener classes. Defaults to 'app/listeners'.
626
- notifications : str or Path, optional
627
- Directory for notification classes. Defaults to 'app/notifications'.
628
- jobs : str or Path, optional
629
- Directory for queue job classes. Defaults to 'app/jobs'.
630
- policies : str or Path, optional
631
- Directory for authorization policy classes. Defaults to 'app/policies'.
632
- exceptions : str or Path, optional
633
- Directory for custom exception classes. Defaults to 'app/exceptions'.
634
- services : str or Path, optional
635
- Directory for application service classes. Defaults to 'app/services'.
636
- views : str or Path, optional
637
- Directory for view templates. Defaults to 'resources/views'.
638
- lang : str or Path, optional
639
- Directory for language files. Defaults to 'resources/lang'.
640
- assets : str or Path, optional
641
- Directory for asset files. Defaults to 'resources/assets'.
642
- routes : str or Path, optional
643
- Directory for route definitions. Defaults to 'routes'.
644
- config : str or Path, optional
645
- Directory for configuration files. Defaults to 'config'.
646
- migrations : str or Path, optional
647
- Directory for database migration files. Defaults to 'database/migrations'.
648
- seeders : str or Path, optional
649
- Directory for database seeder files. Defaults to 'database/seeders'.
650
- factories : str or Path, optional
651
- Directory for model factory files. Defaults to 'database/factories'.
652
- logs : str or Path, optional
653
- Directory for log file storage. Defaults to 'storage/logs'.
654
- sessions : str or Path, optional
655
- Directory for session file storage. Defaults to 'storage/framework/sessions'.
656
- cache : str or Path, optional
657
- Directory for cache file storage. Defaults to 'storage/framework/cache'.
658
- testing : str or Path, optional
659
- Directory for testing file storage. Defaults to 'storage/framework/testing'.
821
+ mail : Mail or dict
822
+ The mail configuration as either a Mail instance or a dictionary
823
+ containing configuration parameters that can be used to construct a
824
+ Mail instance.
660
825
 
661
826
  Returns
662
827
  -------
663
828
  Application
664
- Returns the current Application instance to enable method chaining.
829
+ The current application instance to enable method chaining.
830
+
831
+ Raises
832
+ ------
833
+ OrionisTypeError
834
+ If the mail parameter is not an instance of Mail or a dictionary.
665
835
 
666
836
  Notes
667
837
  -----
668
- All path parameters accept either string or Path objects and are automatically
669
- resolved to absolute paths relative to the current working directory. The
670
- resolved paths are stored as strings in the internal configuration dictionary.
838
+ Dictionary inputs are automatically converted to Mail instances using
839
+ the dictionary unpacking operator (**mail).
671
840
  """
672
841
  pass
673
842
 
674
843
  @abstractmethod
675
- def loadPaths(self, paths: Paths | dict) -> 'IApplication':
844
+ def setConfigQueue(
845
+ self,
846
+ **queue_config
847
+ ) -> 'IApplication':
676
848
  """
677
- Load application paths configuration from a configuration object or dictionary.
849
+ Configure the queue system using keyword arguments.
850
+
851
+ This method provides a convenient way to set queue configuration by
852
+ passing individual configuration parameters as keyword arguments.
853
+ The parameters are used to create a Queue configuration instance.
678
854
 
679
855
  Parameters
680
856
  ----------
681
- paths : Paths | dict
682
- A Paths configuration object or dictionary containing application
683
- directory paths to be loaded into the application.
857
+ **queue_config : dict
858
+ Configuration parameters for the queue system. These must match the
859
+ field names and types expected by the Queue dataclass from
860
+ orionis.foundation.config.queue.entities.queue.Queue.
684
861
 
685
862
  Returns
686
863
  -------
687
- IApplication
688
- The application instance to enable method chaining.
864
+ Application
865
+ The current application instance to enable method chaining.
866
+
867
+ Notes
868
+ -----
869
+ This method internally creates a Queue instance from the provided keyword
870
+ arguments and then calls loadConfigQueue() to store the configuration.
689
871
  """
690
872
  pass
691
873
 
692
874
  @abstractmethod
693
- def setBasePath(
875
+ def loadConfigQueue(
694
876
  self,
695
- basePath: Path
877
+ queue: Queue | dict
696
878
  ) -> 'IApplication':
697
879
  """
698
- Set the base path for the application.
880
+ Load and store queue configuration from a Queue instance or dictionary.
699
881
 
700
- This method allows setting the base path of the application, which is
701
- used as the root directory for all relative paths in the application.
702
- The provided basePath is resolved to an absolute path.
882
+ This method validates and stores the queue configuration in the
883
+ internal configurators storage. If a dictionary is provided, it will
884
+ be converted to a Queue instance before storage.
703
885
 
704
886
  Parameters
705
887
  ----------
706
- basePath : Path
707
- The base path to set for the application. It can be a string or a Path object.
888
+ queue : Queue or dict
889
+ The queue configuration as either a Queue instance or a dictionary
890
+ containing configuration parameters that can be used to construct a
891
+ Queue instance.
708
892
 
709
893
  Returns
710
894
  -------
711
895
  Application
712
896
  The current application instance to enable method chaining.
713
- """
714
- pass
715
897
 
716
- @abstractmethod
717
- def getBasePath(
718
- self
719
- ) -> Path:
720
- """
721
- Get the base path of the application.
722
-
723
- This method returns the base path that was previously set using setBasePath().
724
- If no base path has been set, it returns None.
898
+ Raises
899
+ ------
900
+ OrionisTypeError
901
+ If the queue parameter is not an instance of Queue or a dictionary.
725
902
 
726
- Returns
727
- -------
728
- Path
729
- The base path of the application as a string or Path object, or None if not set.
903
+ Notes
904
+ -----
905
+ Dictionary inputs are automatically converted to Queue instances using
906
+ the dictionary unpacking operator (**queue).
730
907
  """
731
908
  pass
732
909
 
733
910
  @abstractmethod
734
- def setConfigQueue(self, **queue_config) -> 'IApplication':
911
+ def setConfigSession(
912
+ self,
913
+ **session_config
914
+ ) -> 'IApplication':
735
915
  """
736
- Configure queue service settings using keyword arguments.
916
+ Configure the session system using keyword arguments.
917
+
918
+ This method provides a convenient way to set session configuration by
919
+ passing individual configuration parameters as keyword arguments.
920
+ The parameters are used to create a Session configuration instance.
737
921
 
738
922
  Parameters
739
923
  ----------
740
- **queue_config
741
- Arbitrary keyword arguments representing queue service configuration
742
- settings. Keys should match the expected queue parameter names.
924
+ **session_config : dict
925
+ Configuration parameters for the session system. These must match the
926
+ field names and types expected by the Session dataclass from
927
+ orionis.foundation.config.session.entities.session.Session.
743
928
 
744
929
  Returns
745
930
  -------
746
- IApplication
747
- The application instance to enable method chaining.
931
+ Application
932
+ The current application instance to enable method chaining.
933
+
934
+ Notes
935
+ -----
936
+ This method internally creates a Session instance from the provided keyword
937
+ arguments and then calls loadConfigSession() to store the configuration.
748
938
  """
749
939
  pass
750
940
 
751
941
  @abstractmethod
752
- def loadConfigQueue(self, queue: Queue | dict) -> 'IApplication':
942
+ def loadConfigSession(
943
+ self,
944
+ session: Session | dict
945
+ ) -> 'IApplication':
753
946
  """
754
- Load queue configuration from a configuration object or dictionary.
947
+ Load and store session configuration from a Session instance or dictionary.
948
+
949
+ This method validates and stores the session configuration in the
950
+ internal configurators storage. If a dictionary is provided, it will
951
+ be converted to a Session instance before storage.
755
952
 
756
953
  Parameters
757
954
  ----------
758
- queue : Queue | dict
759
- A Queue configuration object or dictionary containing queue service
760
- settings to be loaded into the application.
955
+ session : Session or dict
956
+ The session configuration as either a Session instance or a dictionary
957
+ containing configuration parameters that can be used to construct a
958
+ Session instance.
761
959
 
762
960
  Returns
763
961
  -------
764
- IApplication
765
- The application instance to enable method chaining.
962
+ Application
963
+ The current application instance to enable method chaining.
964
+
965
+ Raises
966
+ ------
967
+ OrionisTypeError
968
+ If the session parameter is not an instance of Session or a dictionary.
969
+
970
+ Notes
971
+ -----
972
+ Dictionary inputs are automatically converted to Session instances using
973
+ the dictionary unpacking operator (**session).
766
974
  """
767
975
  pass
768
976
 
769
977
  @abstractmethod
770
- def setConfigSession(self, **session_config) -> 'IApplication':
978
+ def setConfigTesting(
979
+ self,
980
+ **testing_config
981
+ ) -> 'IApplication':
771
982
  """
772
- Configure session management settings using keyword arguments.
983
+ Configure the testing framework using keyword arguments.
984
+
985
+ This method provides a convenient way to set testing configuration by
986
+ passing individual configuration parameters as keyword arguments.
987
+ The parameters are used to create a Testing configuration instance.
773
988
 
774
989
  Parameters
775
990
  ----------
776
- **session_config
777
- Arbitrary keyword arguments representing session management configuration
778
- settings. Keys should match the expected session parameter names.
991
+ **testing_config : dict
992
+ Configuration parameters for the testing framework. These must match the
993
+ field names and types expected by the Testing dataclass from
994
+ orionis.foundation.config.testing.entities.testing.Testing.
779
995
 
780
996
  Returns
781
997
  -------
782
- IApplication
783
- The application instance to enable method chaining.
998
+ Application
999
+ The current application instance to enable method chaining.
1000
+
1001
+ Notes
1002
+ -----
1003
+ This method internally creates a Testing instance from the provided keyword
1004
+ arguments and then calls loadConfigTesting() to store the configuration.
784
1005
  """
785
1006
  pass
786
1007
 
787
1008
  @abstractmethod
788
- def loadConfigSession(self, session: Session | dict) -> 'IApplication':
1009
+ def loadConfigTesting(
1010
+ self,
1011
+ testing: Testing | dict
1012
+ ) -> 'IApplication':
789
1013
  """
790
- Load session configuration from a configuration object or dictionary.
1014
+ Load and store testing configuration from a Testing instance or dictionary.
1015
+
1016
+ This method validates and stores the testing framework configuration in the
1017
+ internal configurators storage. If a dictionary is provided, it will be
1018
+ converted to a Testing instance before storage.
791
1019
 
792
1020
  Parameters
793
1021
  ----------
794
- session : Session | dict
795
- A Session configuration object or dictionary containing session
796
- management settings to be loaded into the application.
1022
+ testing : Testing or dict
1023
+ The testing configuration as either a Testing instance or a dictionary
1024
+ containing configuration parameters that can be used to construct a
1025
+ Testing instance.
797
1026
 
798
1027
  Returns
799
1028
  -------
800
- IApplication
801
- The application instance to enable method chaining.
1029
+ Application
1030
+ The current application instance to enable method chaining.
1031
+
1032
+ Raises
1033
+ ------
1034
+ OrionisTypeError
1035
+ If the testing parameter is not an instance of Testing or a dictionary.
1036
+
1037
+ Notes
1038
+ -----
1039
+ Dictionary inputs are automatically converted to Testing instances using
1040
+ the dictionary unpacking operator (**testing).
802
1041
  """
803
1042
  pass
804
1043
 
805
1044
  @abstractmethod
806
- def setConfigTesting(self, **testing_config) -> 'IApplication':
1045
+ def setConfigPaths(
1046
+ self,
1047
+ *,
1048
+ root: str | Path = str(Path.cwd().resolve()),
1049
+ app: str | Path = str((Path.cwd() / 'app').resolve()),
1050
+ console: str | Path = str((Path.cwd() / 'app' / 'console').resolve()),
1051
+ exceptions: str | Path = str((Path.cwd() / 'app' / 'exceptions').resolve()),
1052
+ http: str | Path = str((Path.cwd() / 'app' / 'http').resolve()),
1053
+ models: str | Path = str((Path.cwd() / 'app' / 'models').resolve()),
1054
+ providers: str | Path = str((Path.cwd() / 'app' / 'providers').resolve()),
1055
+ notifications: str | Path = str((Path.cwd() / 'app' / 'notifications').resolve()),
1056
+ services: str | Path = str((Path.cwd() / 'app' / 'services').resolve()),
1057
+ jobs: str | Path = str((Path.cwd() / 'app' / 'jobs').resolve()),
1058
+ bootstrap: str | Path = str((Path.cwd() / 'app' / 'bootstrap').resolve()),
1059
+ config: str | Path = str((Path.cwd() / 'config').resolve()),
1060
+ database: str | Path = str((Path.cwd() / 'database' / 'database').resolve()),
1061
+ resources: str | Path = str((Path.cwd() / 'resources').resolve()),
1062
+ routes: str | Path = str((Path.cwd() / 'routes').resolve()),
1063
+ storage: str | Path = str((Path.cwd() / 'storage').resolve()),
1064
+ tests: str | Path = str((Path.cwd() / 'tests').resolve())
1065
+ ) -> 'IApplication':
807
1066
  """
808
- Configure testing environment settings using keyword arguments.
1067
+ Set and resolve application directory paths using keyword arguments.
809
1068
 
810
- Parameters
811
- ----------
812
- **testing_config
813
- Arbitrary keyword arguments representing testing configuration
814
- settings. Keys should match the expected testing parameter names.
1069
+ Only the following options are available:
1070
+ - root
1071
+ - app
1072
+ - console
1073
+ - exceptions
1074
+ - http
1075
+ - models
1076
+ - providers
1077
+ - notifications
1078
+ - services
1079
+ - jobs
1080
+ - bootstrap
1081
+ - config
1082
+ - database
1083
+ - resources
1084
+ - routes
1085
+ - storage
1086
+ - tests
1087
+
1088
+ All provided paths are resolved to absolute paths and stored as strings in the configuration dictionary.
815
1089
 
816
1090
  Returns
817
1091
  -------
818
- IApplication
819
- The application instance to enable method chaining.
1092
+ Application
1093
+ Returns the current Application instance to enable method chaining.
820
1094
  """
821
1095
  pass
822
1096
 
823
1097
  @abstractmethod
824
- def loadConfigTesting(self, testing: Testing | dict) -> 'IApplication':
1098
+ def loadConfigPaths(
1099
+ self,
1100
+ paths: Paths | dict
1101
+ ) -> 'IApplication':
825
1102
  """
826
- Load testing configuration from a configuration object or dictionary.
1103
+ Load and store path configuration from a Paths instance or dictionary.
1104
+
1105
+ This method validates and stores the application path configuration in the
1106
+ internal configurators storage. If a dictionary is provided, it will be
1107
+ converted to a Paths instance before storage.
827
1108
 
828
1109
  Parameters
829
1110
  ----------
830
- testing : Testing | dict
831
- A Testing configuration object or dictionary containing testing
832
- environment settings to be loaded into the application.
1111
+ paths : Paths or dict
1112
+ The path configuration as either a Paths instance or a dictionary
1113
+ containing path parameters that can be used to construct a Paths instance.
833
1114
 
834
1115
  Returns
835
1116
  -------
836
- IApplication
837
- The application instance to enable method chaining.
1117
+ Application
1118
+ The current application instance to enable method chaining.
1119
+
1120
+ Raises
1121
+ ------
1122
+ OrionisTypeError
1123
+ If the paths parameter is not an instance of Paths or a dictionary.
1124
+
1125
+ Notes
1126
+ -----
1127
+ Dictionary inputs are automatically converted to Paths instances using
1128
+ the dictionary unpacking operator (**paths). This method is used internally
1129
+ by withConfigurators() and can be called directly for path configuration.
838
1130
  """
839
1131
  pass
840
1132
 
841
1133
  @abstractmethod
842
- def config(self, key: str = None, default: Any = None) -> Any:
1134
+ def config(
1135
+ self,
1136
+ key: str = None
1137
+ ) -> Any:
843
1138
  """
844
- Retrieve configuration values using dot notation access.
1139
+ Retrieve application configuration values using dot notation.
845
1140
 
846
- This method provides access to the application's configuration system,
847
- allowing retrieval of specific configuration values by key or the entire
848
- configuration object when no key is specified.
1141
+ This method provides access to the application's configuration settings,
1142
+ supporting retrieval of nested values using dot notation (e.g., "database.default").
1143
+ If a key is provided, the method returns the corresponding configuration value.
1144
+ If no key is provided, it returns the entire configuration dictionary, excluding
1145
+ path-related configuration (which should be accessed via the `path()` method).
849
1146
 
850
1147
  Parameters
851
1148
  ----------
852
1149
  key : str, optional
853
- The configuration key to retrieve using dot notation (e.g., 'database.host').
854
- If None, returns the entire configuration object.
855
- default : Any, optional
856
- The default value to return if the specified key is not found.
1150
+ The configuration key to retrieve, supporting dot notation for nested
1151
+ values (e.g., "database.default", "app.name"). If None, the method returns
1152
+ the entire configuration dictionary except for the 'path' configuration.
1153
+ Default is None.
857
1154
 
858
1155
  Returns
859
1156
  -------
860
1157
  Any
861
- The configuration value associated with the key, the entire configuration
862
- object if no key is provided, or the default value if the key is not found.
1158
+ If `key` is provided and found, returns the corresponding configuration value.
1159
+ If `key` is None, returns the entire configuration dictionary (excluding 'path').
1160
+ If the key is not found, returns None.
1161
+
1162
+ Raises
1163
+ ------
1164
+ OrionisRuntimeError
1165
+ If the application configuration has not been initialized (i.e., if `create()`
1166
+ has not been called before accessing configuration).
1167
+ OrionisValueError
1168
+ If the provided `key` parameter is not a string type.
1169
+
1170
+ Notes
1171
+ -----
1172
+ The method traverses nested configuration structures by splitting the key
1173
+ on dots and navigating through dictionary levels. Path configurations are
1174
+ excluded from full configuration returns and should be accessed via the
1175
+ `path()` method instead.
863
1176
  """
864
1177
  pass
865
1178
 
866
1179
  @abstractmethod
867
- def path(self, key: str = None, default: Any = None) -> str:
1180
+ def path(
1181
+ self,
1182
+ key: str = None
1183
+ ) -> Path | dict:
868
1184
  """
869
- Retrieve path configuration values using dot notation access.
1185
+ Retrieve application path configuration values using dot notation.
870
1186
 
871
- This method provides access to the application's path configuration system,
872
- allowing retrieval of specific path values by key or the entire paths
873
- configuration when no key is specified.
1187
+ Provides access to the application's path configuration, allowing retrieval of either a specific path value or the entire paths configuration dictionary. If a key is provided, the corresponding path is returned as a `Path` object. If no key is provided, a dictionary mapping all path configuration keys to their resolved `Path` objects is returned.
874
1188
 
875
1189
  Parameters
876
1190
  ----------
877
1191
  key : str, optional
878
- The path configuration key to retrieve using dot notation (e.g., 'storage.logs').
879
- If None, returns the entire paths configuration object.
880
- default : Any, optional
881
- The default value to return if the specified key is not found.
1192
+ Dot-notated key specifying the path configuration to retrieve (e.g., "console", "storage.logs").
1193
+ If None, returns the entire paths configuration dictionary. Default is None.
882
1194
 
883
1195
  Returns
884
1196
  -------
885
- str
886
- The path value associated with the key, the entire paths configuration
887
- object if no key is provided, or the default value if the key is not found.
1197
+ Path or dict
1198
+ If `key` is provided and found, returns the resolved `Path` object for that key.
1199
+ If `key` is None, returns a dictionary mapping all path keys to their `Path` objects.
1200
+ If `key` is not found, returns None.
1201
+
1202
+ Raises
1203
+ ------
1204
+ OrionisRuntimeError
1205
+ If the application configuration has not been initialized (i.e., if `create()` has not been called).
1206
+ OrionisValueError
1207
+ If the provided `key` parameter is not a string.
1208
+
1209
+ Notes
1210
+ -----
1211
+ - The method traverses the paths configuration structure by splitting the key on dots and navigating through dictionary levels.
1212
+ - This method is specifically designed for path-related configuration access, separate from general application configuration.
1213
+ - All returned paths are resolved as `Path` objects for consistency and ease of use.
888
1214
  """
889
1215
  pass
890
1216
 
891
1217
  @abstractmethod
892
- def create(self) -> 'IApplication':
1218
+ def create(
1219
+ self
1220
+ ) -> 'IApplication':
893
1221
  """
894
- Bootstrap and initialize the application.
1222
+ Bootstrap and initialize the complete application framework.
895
1223
 
896
- This method performs the complete application initialization process,
897
- including loading and registering all configured service providers,
898
- initializing kernels, and preparing the application for operation.
899
- After calling this method, the application should be fully operational
900
- and ready to handle requests or commands.
1224
+ This method orchestrates the entire application startup process including
1225
+ configuration loading, service provider registration and booting, framework
1226
+ kernel initialization, and logging setup. It ensures the application is
1227
+ fully prepared for operation and prevents duplicate initialization.
901
1228
 
902
1229
  Returns
903
1230
  -------
904
- IApplication
905
- The fully initialized application instance ready for operation.
906
- """
907
- pass
1231
+ Application
1232
+ The current application instance to enable method chaining.
1233
+
1234
+ Notes
1235
+ -----
1236
+ The bootstrap process follows this sequence:
1237
+ 1. Load and process all configuration from configurators
1238
+ 2. Register core framework service providers
1239
+ 3. Register and boot all service providers
1240
+ 4. Initialize framework kernels (Testing, CLI)
1241
+ 5. Log successful startup with timing information
1242
+ 6. Mark application as booted to prevent re-initialization
1243
+
1244
+ This method is idempotent - calling it multiple times will not cause
1245
+ duplicate initialization. The startup time is calculated and logged
1246
+ for performance monitoring purposes.
1247
+ """
1248
+ pass