Subversion-Projekte lars-tiefland.laravel_shop

Revision

Revision 399 | Zur aktuellen Revision | Details | Letzte Änderung | Log anzeigen | RSS feed

Revision Autor Zeilennr. Zeile
148 lars 1
<?php
2
 
3
namespace Illuminate\Database\Eloquent\Casts;
4
 
5
use ArrayObject as BaseArrayObject;
6
use Illuminate\Contracts\Support\Arrayable;
7
use JsonSerializable;
8
 
9
class ArrayObject extends BaseArrayObject implements Arrayable, JsonSerializable
10
{
11
    /**
12
     * Get a collection containing the underlying array.
13
     *
14
     * @return \Illuminate\Support\Collection
15
     */
16
    public function collect()
17
    {
18
        return collect($this->getArrayCopy());
19
    }
20
 
21
    /**
22
     * Get the instance as an array.
23
     *
24
     * @return array
25
     */
26
    public function toArray()
27
    {
28
        return $this->getArrayCopy();
29
    }
30
 
31
    /**
32
     * Get the array that should be JSON serialized.
33
     *
34
     * @return array
35
     */
36
    public function jsonSerialize(): array
37
    {
38
        return $this->getArrayCopy();
39
    }
40
}