Пример #1
0
 /**
  * 
  * @param DF_Web_Path $sub
  * @return DF_Web_Path
  */
 public function append_path($sub)
 {
     if (!$sub instanceof DF_Web_Path) {
         throw new DF_Error_InvalidArgumentException('sub', $sub, DF_Web_Path);
     }
     $sub_str = "{$sub}";
     if ($sub->is_absolute()) {
         $sub_str = substr($sub_str, 1);
     }
     $base_str = "{$this}";
     if (!$this->has_trailing_slash()) {
         $base_str .= "/";
     }
     $new_path = "{$base_str}{$sub_str}";
     return DF_Web_Path::fromString($new_path);
 }