» Details |
---|
|
» Comment |
It would be good to have some basic AI over the slashes. For example, in case when there are double slashes: '/home//httpd/foobar' - it has to be treated the same way as '/home/httpd/foobar' and maybe also '/home/httpd/foobar/', although I'm not sure for the latter. Also, beside the ArrayIterator interface, a public $length (count) variable/method would be handy. Otherwise, it might be really cool if you're planning to add in the future some utility functions such as: - converting relative to absolute path and vice versa; - finding the greatest common parent of two paths; - comparing paths; - providing the relative path from one path to another, for example: $p->diff('/home/httpd/foobar', '/home/foo') to give '../../foo'; etc. |