Feature Request #4174

Add `Arr::values()`

Added by Kemal Delalic 10 months ago. Updated 4 months ago.

Status:Closed Start date:08/03/2011
Priority:Normal Due date:
Assignee:Woody Gilk % Done:

0%

Category:Core
Target version:-
Resolution:invalid Points:1

Description

I already suggested this before but it wasn't too helpful except for "occasional" `list()` calls.
With action parameters removed in 3.2, `list()` became more useful:

list($id, $seo, $tab) = Arr::values($this->request->param(), array('id','seo','tab'));

Other solution would be to have `Request::param()` able to accept an array of keys to return(values only, for `list()` usage).

History

Updated by Jeremy Bush 10 months ago

  • Tracker changed from Bug Report to Feature Request
  • Target version changed from v3.2.1 to v3.3.0

Updated by Jeremy Bush 5 months ago

  • Target version changed from v3.3.0 to Unscheduled

Updated by Woody Gilk 4 months ago

  • Category set to Core
  • Status changed from New to Closed
  • Assignee set to Woody Gilk
  • Target version deleted (Unscheduled)
  • Resolution set to invalid

We already have Arr::extract which does the same thing.

Updated by Kemal Delalic 4 months ago

Woody Gilk wrote:

We already have Arr::extract which does the same thing.

Almost the same thing, `list()` doesn't like associative keys

Updated by Woody Gilk 4 months ago

Wrap it in array_values then.

Also available in: Atom PDF