summaryrefslogtreecommitdiff
path: root/vendor/doctrine/collections/docs/en/derived-collections.rst
diff options
context:
space:
mode:
Diffstat (limited to 'vendor/doctrine/collections/docs/en/derived-collections.rst')
-rw-r--r--vendor/doctrine/collections/docs/en/derived-collections.rst26
1 files changed, 0 insertions, 26 deletions
diff --git a/vendor/doctrine/collections/docs/en/derived-collections.rst b/vendor/doctrine/collections/docs/en/derived-collections.rst
deleted file mode 100644
index 03d9da5..0000000
--- a/vendor/doctrine/collections/docs/en/derived-collections.rst
+++ /dev/null
@@ -1,26 +0,0 @@
-Derived Collections
-===================
-
-You can create custom collection classes by extending the
-``Doctrine\Common\Collections\ArrayCollection`` class. If the
-``__construct`` semantics are different from the default ``ArrayCollection``
-you can override the ``createFrom`` method:
-
-.. code-block:: php
- final class DerivedArrayCollection extends ArrayCollection
- {
- /** @var \stdClass */
- private $foo;
-
- public function __construct(\stdClass $foo, array $elements = [])
- {
- $this->foo = $foo;
-
- parent::__construct($elements);
- }
-
- protected function createFrom(array $elements) : self
- {
- return new static($this->foo, $elements);
- }
- }