Ajout de get_url() et renomer() à Chemin.
This commit is contained in:
parent
bcd4ac8924
commit
ceca66abe6
|
@ -46,6 +46,10 @@ class Chemin {
|
||||||
return '/'.join($this->segments, '/');
|
return '/'.join($this->segments, '/');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function get_url() {
|
||||||
|
return $config_url_base . '/' . $this->get();
|
||||||
|
}
|
||||||
|
|
||||||
public function enfant($nom) {
|
public function enfant($nom) {
|
||||||
$s = $this->segments;
|
$s = $this->segments;
|
||||||
$x = self::nettoyer_segment($nom)
|
$x = self::nettoyer_segment($nom)
|
||||||
|
@ -59,6 +63,10 @@ class Chemin {
|
||||||
return new self(array_slice($this->segments, 0, -1));
|
return new self(array_slice($this->segments, 0, -1));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function renomer($nom) {
|
||||||
|
return $this->parent()->enfant($nom);
|
||||||
|
}
|
||||||
|
|
||||||
public function dernier() {
|
public function dernier() {
|
||||||
return end($this->segments);
|
return end($this->segments);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user