use Friendica\Util;
use Psr\Log\LoggerInterface;
+$basepath = (function() {
+ $path = dirname(__FILE__, 2);
+
+ return ($realpath = realpath($path)) ? $realpath : $path;
+})();
+
return [
'*' => [
// marks all class result as shared for other creations, so there's just
\Friendica\Core\Addon\Capability\ICanLoadAddons::class => [
'instanceOf' => \Friendica\Core\Addon\Model\AddonLoader::class,
'constructParams' => [
- [Dice::INSTANCE => '$basepath'],
+ $basepath,
[Dice::INSTANCE => Dice::SELF],
],
],
],
\Friendica\Core\Hooks\Util\StrategiesFileManager::class => [
'constructParams' => [
- [Dice::INSTANCE => '$basepath'],
+ $basepath,
],
'call' => [
['loadConfig'],
'instanceOf' => Config\Factory\Config::class,
'call' => [
['createConfigFileManager', [
- [Dice::INSTANCE => '$basepath'],
+ $basepath,
$_SERVER,
], Dice::CHAIN_CALL],
],
'call' => [
['determineRunMode', [true, $_SERVER], Dice::CHAIN_CALL],
['determine', [
- [Dice::INSTANCE => '$basepath']
+ $basepath,
], Dice::CHAIN_CALL],
],
],
],
DbaDefinition::class => [
'constructParams' => [
- [Dice::INSTANCE => '$basepath'],
+ $basepath,
],
'call' => [
['load', [false], Dice::CHAIN_CALL],
],
ViewDefinition::class => [
'constructParams' => [
- [Dice::INSTANCE => '$basepath'],
+ $basepath,
],
'call' => [
['load', [false], Dice::CHAIN_CALL],
],
App\Page::class => [
'constructParams' => [
- [Dice::INSTANCE => '$basepath'],
+ $basepath,
],
],
\Psr\Log\LoggerInterface::class => [
],
\Friendica\Core\System::class => [
'constructParams' => [
- [Dice::INSTANCE => '$basepath'],
+ $basepath,
],
],
App\Router::class => [