File tree Expand file tree Collapse file tree 2 files changed +18
-2
lines changed
Expand file tree Collapse file tree 2 files changed +18
-2
lines changed Original file line number Diff line number Diff line change @@ -63,7 +63,7 @@ public function getDefaultResourceAdapterConfig(): array
6363 return $ this ->_defaultResourceAdapterConfig ;
6464 }
6565
66- return $ this ->_defaultResourceAdapterConfig = $ this ->getSettings ()->defaults ;
66+ return $ this ->_defaultResourceAdapterConfig = $ this ->getSettings ()->getDefaults () ;
6767 }
6868
6969 /**
Original file line number Diff line number Diff line change 1212 */
1313class Settings extends Model
1414{
15+ // Properties
16+ // =========================================================================
17+
1518 /**
16- * @var array The default endpoint configuration.
19+ * @var callable| array The default endpoint configuration.
1720 */
1821 public $ defaults = [];
1922
2023 /**
2124 * @var array The endpoint configurations.
2225 */
2326 public $ endpoints = [];
27+
28+ // Public Methods
29+ // =========================================================================
30+
31+ /**
32+ * Returns the default endpoint configuration.
33+ *
34+ * @return array The default endpoint configuration.
35+ */
36+ public function getDefaults ()
37+ {
38+ return is_callable ($ this ->defaults ) ? call_user_func ($ this ->defaults ) : $ this ->defaults ;
39+ }
2440}
You can’t perform that action at this time.
0 commit comments