Skip to content
This repository has been archived by the owner on Jan 23, 2023. It is now read-only.

Commit

Permalink
keys
Browse files Browse the repository at this point in the history
  • Loading branch information
rez1dent3 committed Sep 22, 2017
1 parent 7b03085 commit e7b2207
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion src/Slice/Slice.php
Original file line number Diff line number Diff line change
Expand Up @@ -81,12 +81,20 @@ public function asGenerator()
}
}

/**
* @return array
*/
public function keys()
{
return Arr::getKeys($this->data);
}

/**
* @return Slice[]
*/
public function asObject()
{
return \iterator_to_array($this->asGenerator());
return Arr::iterator($this->asGenerator());
}

/**
Expand Down

0 comments on commit e7b2207

Please sign in to comment.