www

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs | README

commit ceca66abe6edf074e05175439b7f972ba5e99902
parent bcd4ac8924dc2eda8e5cae1b19ae66aed2cc5c5a
Author: Georges Dupéron <jahvascriptmaniac+github@free.fr>
Date:   Sat, 31 Jul 2010 18:02:29 +0200

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

Diffstat:
M__cms__/chemin/chemin.php | 8++++++++
1 file changed, 8 insertions(+), 0 deletions(-)

diff --git a/__cms__/chemin/chemin.php b/__cms__/chemin/chemin.php @@ -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); }