Ajout de get_url() et renomer() à Chemin.

This commit is contained in:
Georges Dupéron 2010-07-31 18:02:29 +02:00
parent bcd4ac8924
commit ceca66abe6

View File

@ -46,6 +46,10 @@ class Chemin {
return '/'.join($this->segments, '/');
}
public function get_url() {
return $config_url_base . '/' . $this->get();
}
public function enfant($nom) {
$s = $this->segments;
$x = self::nettoyer_segment($nom)
@ -59,6 +63,10 @@ class Chemin {
return new self(array_slice($this->segments, 0, -1));
}
public function renomer($nom) {
return $this->parent()->enfant($nom);
}
public function dernier() {
return end($this->segments);
}