Illuminate\Support\Collection::__construct PHP Метод

__construct() публичный Метод

Create a new collection.
public __construct ( mixed $items = [] ) : void
$items mixed
Результат void
    public function __construct($items = [])
    {
        $this->items = $this->getArrayableItems($items);
    }

Usage Example

Пример #1
0
 public function __construct(string $name, array $options = [])
 {
     parent::__construct();
     $this->name = $name;
     $this->caption = $options['caption'] ?? $name;
     $this->priority = $options['priority'] ?? $this->priority;
 }
All Usage Examples Of Illuminate\Support\Collection::__construct