Skip to content

Commit

Permalink
Minor docs update.
Browse files Browse the repository at this point in the history
  • Loading branch information
serge-kvashnin committed May 26, 2024
1 parent 58fc195 commit 83cdeff
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
2 changes: 1 addition & 1 deletion docs/config/_default/hugo.toml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
title = "Dependency Injection Container"
title = "Container"
baseurl = "/"
canonifyURLs = false
disableAliases = true
Expand Down
9 changes: 6 additions & 3 deletions docs/content/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ date: 2024-05-26T14:07:40+02:00
lastmod: 2024-05-26T14:07:40+02:00
draft: false
seo:
title: "PHP validation library" # custom title (optional)
title: "PHP dependency injection container" # custom title (optional)
description: "" # custom description (recommended)
canonical: "" # custom canonical URL (optional)
noindex: false # false (default) or true
Expand All @@ -30,7 +30,8 @@ Create and configure service objects directly within your configuration

```php
return [
'db.connection' => obj(DbConnection::class, name: 'main')->call('setLogger', ref('logger')),
'db.connection' => obj(DbConnection::class, name: 'main')
->call('setLogger', ref('logger')),
];
```

Expand Down Expand Up @@ -93,7 +94,9 @@ return [
#[Env('DB_NAME', default: 'main')] $name
) => "{$driver}://{$user}:{$password}@{$host}:{$port}/{$name}",

'db.connection' => static function(#[Ref('db.url')] string $url) {
'db.connection' => static function(
#[Ref('db.url')] string $url,
) {
return new DbConnection(url: $url);
},
];
Expand Down

0 comments on commit 83cdeff

Please sign in to comment.