Proposal for "PathNavigator"

» Metadata » Status
» Description
The Text_PathArray class provides convenient access to "/path/sub/strings".
These strings can be accessed in various ways:

  1. by numeric index (e.g., index 1 of /pages/staff.html returns "staff.html")
  2. by variable name (e.g., index "id" of /pages/id/1 returns 1)
  3. using the slice method

Example Code:
require_once 'Text/PathArray.php';
$p = new Text_PathArray('/the/golden/path', '/');
echo $p->get(2); // prints 'path'
echo $p->get('golden'); // prints 'path'
echo $p->slice(1); // prints 'golden/path'
echo $p->slice(-2, 1); // prints 'golden'
echo $p->slice(-1); // prints 'path'
» Dependencies » Links
» Timeline » Changelog
  • First Draft: 2006-05-04
  • Proposal: 2006-05-04
  • Call for Votes: 2006-05-14