Debian Codegraph @

lib/3rdParty/composer/illuminate/contracts/Database/Eloquent/CastsAttributes.php

raw symbols SCIP
1 <?php
2
3 namespace Illuminate\Contracts\Database\Eloquent;
4
5 use Illuminate\Database\Eloquent\Model;
6
7 /**
8 * @template TGet
9 * @template TSet
10 */
11 interface CastsAttributes
12 {
13 /**
14 * Transform the attribute from the underlying model values.
15 *
16 * @param \Illuminate\Database\Eloquent\Model $model
17 * @param string $key
18 * @param mixed $value
19 * @param array<string, mixed> $attributes
20 * @return TGet|null
21 */
22 public function get(Model $model, string $key, mixed $value, array $attributes);
23
24 /**
25 * Transform the attribute to its underlying model values.
26 *
27 * @param \Illuminate\Database\Eloquent\Model $model
28 * @param string $key
29 * @param TSet|null $value
30 * @param array<string, mixed> $attributes
31 * @return mixed
32 */
33 public function set(Model $model, string $key, mixed $value, array $attributes);
34 }