Skip to content

Commit b54bfa1

Browse files
committed
Update readme
1 parent 282b50a commit b54bfa1

File tree

1 file changed

+30
-30
lines changed

1 file changed

+30
-30
lines changed

README.md

Lines changed: 30 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -121,41 +121,41 @@ implement your own Hydrator. To do this, follow the simple steps:
121121

122122
### Usefull Attributes
123123

124-
#### Composite\Entity\Attributes\SkipSerialization
124+
* #### Composite\Entity\Attributes\SkipSerialization
125125

126-
Add this attribute to any entity property to remove it from the hydration process.
126+
Add this attribute to any entity property to remove it from the hydration process.
127127

128-
#### Composite\Entity\Attributes\ListOf
128+
* #### Composite\Entity\Attributes\ListOf
129129

130-
Can be added to array property, indicate the desired target entity class to store list of of this entity in your property.
131-
Use the second parameter `keyColumn` to store the associative array in your property, so you can easily search the entities
132-
by the named key later.
130+
Can be added to array property, indicate the desired target entity class to store list of of this entity in your property.
131+
Use the second parameter `keyColumn` to store the associative array in your property, so you can easily search the entities
132+
by the named key later.
133133

134-
Example:
135-
136-
```php
137-
use Composite\Entity\AbstractEntity;
138-
use Composite\Entity\Attributes\ListOf;
139-
140-
class User extends AbstractEntity
141-
{
142-
public readonly int $id;
134+
Example:
143135

144-
public function __construct(
145-
public string $name,
146-
#[ListOf(Setting::class, 'name')]
147-
public array $settings = [],
148-
) {}
149-
}
150-
151-
class Setting extends AbstractEntity
152-
{
153-
public function __construct(
154-
public readonly string $name,
155-
public bool $isActive,
156-
) {}
157-
}
158-
```
136+
```php
137+
use Composite\Entity\AbstractEntity;
138+
use Composite\Entity\Attributes\ListOf;
139+
140+
class User extends AbstractEntity
141+
{
142+
public readonly int $id;
143+
144+
public function __construct(
145+
public string $name,
146+
#[ListOf(Setting::class, 'name')]
147+
public array $settings = [],
148+
) {}
149+
}
150+
151+
class Setting extends AbstractEntity
152+
{
153+
public function __construct(
154+
public readonly string $name,
155+
public bool $isActive,
156+
) {}
157+
}
158+
```
159159

160160
## License:
161161

0 commit comments

Comments
 (0)