Subversion-Projekte lars-tiefland.laravel_shop

Revision

Revision 148 | Details | Vergleich mit vorheriger | Letzte Änderung | Log anzeigen | RSS feed

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