Skip to content
Permalink
Browse files

Making unwrap public, because "Coding Standards"

  • Loading branch information...
lorenzo committed May 10, 2015
1 parent 04675ba commit d19485bd976be2d6e5d45e182b6b550efe4084c1
Showing with 13 additions and 2 deletions.
  1. +1 −1 src/Collection/CollectionInterface.php
  2. +12 −1 src/Collection/CollectionTrait.php
@@ -855,5 +855,5 @@ public function isEmpty();
*
* @return \Iterator
*/
public function _unwrap();
public function unwrap();
}
@@ -544,12 +544,23 @@ public function isEmpty()
* {@inheritDoc}
*
*/
public function _unwrap()
public function unwrap()
{
$iterator = $this;
while (get_class($iterator) === 'Cake\Collection\Collection') {
$iterator = $iterator->getInnerIterator();
}
return $iterator;
}
/**
* Backwards compatible wrapper for unwrap()
*
* @return \Iterator
* @deprecated
*/
public function _unwrap()
{
return $this->unwrap();
}
}

0 comments on commit d19485b

Please sign in to comment.
You can’t perform that action at this time.