minify/src/39f8957f-cc73-4da5-8b60-6cf.../README.md

82 lines
2.3 KiB
Markdown
Raw Normal View History

2023-04-15 14:58:37 +00:00
```
██████╗ ██████╗ ██╗ ██╗███████╗██████╗
██╔══██╗██╔═══██╗██║ ██║██╔════╝██╔══██╗
██████╔╝██║ ██║██║ █╗ ██║█████╗ ██████╔╝
██╔═══╝ ██║ ██║██║███╗██║██╔══╝ ██╔══██╗
██║ ╚██████╔╝╚███╔███╔╝███████╗██║ ██║
╚═╝ ╚═════╝ ╚══╝╚══╝ ╚══════╝╚═╝ ╚═╝
```
# class Converter (Details)
> namespace: **VDM\Minify\Path**
```uml
@startuml
class Converter #Gold {
# $from
# $to
+ __construct(string $from, string $to, ...)
# normalize(string $path) : string
# shared(string $path1, string $path2) : string
+ convert(string $path) : string
# dirname(string $path) : string
}
note right of Converter::__construct
arguments:
string $from
string $to
string $root = ''
end note
note right of Converter::normalize
Normalize path.
return: string
end note
note right of Converter::shared
Figure out the shared path of 2 locations.
Example:
/home/forkcms/frontend/core/layout/images/img.gif
and
/home/forkcms/frontend/cache/minified_css
share
/home/forkcms/frontend
return: string
end note
note right of Converter::convert
Convert paths relative from 1 file to another.
E.g.
../images/img.gif relative to /home/forkcms/frontend/core/layout/css
should become:
../../core/layout/images/img.gif relative to
/home/forkcms/frontend/cache/minified_css
return: string
end note
note right of Converter::dirname
Attempt to get the directory name from a path.
return: string
end note
@enduml
```
---
```
██╗ ██████╗██████╗
██║██╔════╝██╔══██╗
██║██║ ██████╔╝
██ ██║██║ ██╔══██╗
╚█████╔╝╚██████╗██████╔╝
╚════╝ ╚═════╝╚═════╝
```
> Build with [Joomla Component Builder](https://git.vdm.dev/joomla/Component-Builder)