function AbstractCollection::column
@inheritDoc
Throws
InvalidPropertyOrMethod if the $propertyOrMethod does not exist on the elements in this collection.
UnsupportedOperationException if unable to call column() on this collection.
Overrides CollectionInterface::column
File
-
vendor/
ramsey/ collection/ src/ AbstractCollection.php, line 110
Class
- AbstractCollection
- This class provides a basic implementation of `CollectionInterface`, to minimize the effort required to implement this interface
Namespace
Ramsey\CollectionCode
public function column(string $propertyOrMethod) : array {
$temp = [];
foreach ($this->data as $item) {
/** @psalm-suppress MixedAssignment */
$temp[] = $this->extractValue($item, $propertyOrMethod);
}
return $temp;
}