├── .github
└── workflows
│ └── php.yml
├── .gitignore
├── Dockerfile
├── LICENCE
├── composer.json
├── docs
├── classes
│ ├── Path-Exception-FileExistsException.html
│ ├── Path-Exception-FileNotFoundException.html
│ ├── Path-Exception-IOException.html
│ └── Path-Path.html
├── css
│ ├── base.css
│ ├── normalize.css
│ └── template.css
├── files
│ ├── src-exception-fileexistsexception.html
│ ├── src-exception-filenotfoundexception.html
│ ├── src-exception-ioexception.html
│ └── src-path.html
├── graphs
│ └── classes.html
├── index.html
├── indices
│ └── files.html
├── js
│ ├── search.js
│ ├── searchIndex.js
│ └── template.js
├── namespaces
│ ├── default.html
│ ├── path-exception.html
│ └── path.html
├── packages
│ ├── Application.html
│ ├── default.html
│ └── olinox14path.html
└── reports
│ ├── deprecated.html
│ ├── errors.html
│ └── markers.html
├── logo.png
├── phpdoc.dist.xml
├── phpstan.neon
├── phpunit.xml
├── readme.md
├── src
├── BuiltinProxy.php
├── Exception
│ ├── FileExistsException.php
│ ├── FileNotFoundException.php
│ └── IOException.php
└── Path.php
└── tests
└── unit
└── PathTest.php
/.github/workflows/php.yml:
--------------------------------------------------------------------------------
1 | name: CI
2 |
3 | on:
4 | push:
5 | branches:
6 | - master
7 | - release/*
8 | pull_request:
9 | branches:
10 | - master
11 | - release/*
12 |
13 | jobs:
14 | test:
15 | name: Unit tests
16 |
17 | runs-on: ubuntu-latest
18 |
19 | strategy:
20 | matrix:
21 | php-versions: ['8.0', '8.1', '8.2', '8.3']
22 |
23 | steps:
24 | - uses: actions/checkout@v2
25 |
26 | - name: Setup PHP
27 | uses: shivammathur/setup-php@v2
28 | with:
29 | php-version: ${{ matrix.php-versions }}
30 |
31 | - name: Validate
32 | run: composer validate
33 |
34 | - name: Install
35 | run: composer install --prefer-dist --no-progress
36 |
37 | - name: Run
38 | run: ./vendor/bin/phpunit
39 |
40 | - name: Upload coverage results
41 | env:
42 | COVERALLS_REPO_TOKEN: ${{ secrets.GITHUB_TOKEN }}
43 | run: ./vendor/php-coveralls/php-coveralls/bin/php-coveralls --coverage_clover=build/logs/clover.xml -v
44 |
45 | phpstan:
46 | name: Code quality
47 |
48 | runs-on: ubuntu-latest
49 |
50 | strategy:
51 | matrix:
52 | php-versions: [ '8.0', '8.1', '8.2', '8.3' ]
53 |
54 | steps:
55 | - uses: actions/checkout@v2
56 |
57 | - name: Setup PHP
58 | uses: shivammathur/setup-php@v2
59 | with:
60 | php-version: ${{ matrix.php-versions }}
61 |
62 | - name: Validate
63 | run: composer validate
64 |
65 | - name: Install
66 | run: composer install --prefer-dist --no-progress
67 |
68 | - name: Run PHPStan
69 | run: vendor/bin/phpstan analyse --memory-limit=-1
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | .idea/*
2 | .idea/
3 |
4 | vendor/
5 | /coverage/
6 | /.phpunit.result.cache
7 |
8 | composer.lock
9 |
10 | build/logs/clover.xml
11 |
12 | .phpdoc/
13 |
14 | .php-cs-fixer.cache
15 |
--------------------------------------------------------------------------------
/Dockerfile:
--------------------------------------------------------------------------------
1 | FROM php:8.3-cli
2 |
3 | # Installer les dépendances pour l'extension zip
4 | RUN apt-get update && apt-get install -y \
5 | libzip-dev \
6 | zip \
7 | && docker-php-ext-install zip;
8 |
9 | RUN pecl install xdebug; \
10 | docker-php-ext-enable xdebug;
11 |
12 | COPY --from=composer:latest /usr/bin/composer /usr/bin/composer
13 |
14 | WORKDIR /path
15 |
16 | CMD ["tail", "-f", "/dev/null"]
17 |
--------------------------------------------------------------------------------
/LICENCE:
--------------------------------------------------------------------------------
1 | Copyright (C) 2016 Composer
2 |
3 | Permission is hereby granted, free of charge, to any person obtaining a copy of
4 | this software and associated documentation files (the "Software"), to deal in
5 | the Software without restriction, including without limitation the rights to
6 | use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
7 | of the Software, and to permit persons to whom the Software is furnished to do
8 | so, subject to the following conditions:
9 |
10 | The above copyright notice and this permission notice shall be included in all
11 | copies or substantial portions of the Software.
12 |
13 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
14 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
15 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
16 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
17 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
18 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
19 | SOFTWARE.
--------------------------------------------------------------------------------
/composer.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "olinox14/path-php",
3 | "description": "Object-oriented file and path operations, inspired by the path.py python library",
4 | "version": "0.1.8",
5 | "require": { "php": ">=8.0" },
6 | "type": "library",
7 | "license": "MIT",
8 | "authors": [
9 | {
10 | "name": "Olivier Massot",
11 | "email": "olinox14@tuta.io"
12 | }
13 | ],
14 | "autoload": {
15 | "psr-4": {
16 | "Path\\": "src/"
17 | }
18 | },
19 | "autoload-dev": {
20 | "psr-4": {
21 | "Path\\Tests\\": "tests/"
22 | }
23 | },
24 | "require-dev": {
25 | "phpunit/phpunit": "^9.6",
26 | "ext-posix": "*",
27 | "php-coveralls/php-coveralls": "^2.7",
28 | "phpstan/phpstan": "^2.1",
29 | "friendsofphp/php-cs-fixer": "^3.70"
30 | },
31 | "minimum-stability": "dev",
32 | "prefer-stable": true
33 | }
34 |
--------------------------------------------------------------------------------
/docs/css/normalize.css:
--------------------------------------------------------------------------------
1 | /*! normalize.css v3.0.2 | MIT License | git.io/normalize */
2 |
3 | /**
4 | * 1. Set default font family to sans-serif.
5 | * 2. Prevent iOS text size adjust after orientation change, without disabling
6 | * user zoom.
7 | */
8 |
9 | html {
10 | font-family: sans-serif; /* 1 */
11 | -ms-text-size-adjust: 100%; /* 2 */
12 | -webkit-text-size-adjust: 100%; /* 2 */
13 | }
14 |
15 | /**
16 | * Remove default margin.
17 | */
18 |
19 | body {
20 | margin: 0;
21 | }
22 |
23 | /* HTML5 display definitions
24 | ========================================================================== */
25 |
26 | /**
27 | * Correct `block` display not defined for any HTML5 element in IE 8/9.
28 | * Correct `block` display not defined for `details` or `summary` in IE 10/11
29 | * and Firefox.
30 | * Correct `block` display not defined for `main` in IE 11.
31 | */
32 |
33 | article,
34 | aside,
35 | details,
36 | figcaption,
37 | figure,
38 | footer,
39 | header,
40 | hgroup,
41 | main,
42 | menu,
43 | nav,
44 | section,
45 | summary {
46 | display: block;
47 | }
48 |
49 | /**
50 | * 1. Correct `inline-block` display not defined in IE 8/9.
51 | * 2. Normalize vertical alignment of `progress` in Chrome, Firefox, and Opera.
52 | */
53 |
54 | audio,
55 | canvas,
56 | progress,
57 | video {
58 | display: inline-block; /* 1 */
59 | vertical-align: baseline; /* 2 */
60 | }
61 |
62 | /**
63 | * Prevent modern browsers from displaying `audio` without controls.
64 | * Remove excess height in iOS 5 devices.
65 | */
66 |
67 | audio:not([controls]) {
68 | display: none;
69 | height: 0;
70 | }
71 |
72 | /**
73 | * Address `[hidden]` styling not present in IE 8/9/10.
74 | * Hide the `template` element in IE 8/9/11, Safari, and Firefox < 22.
75 | */
76 |
77 | [hidden],
78 | template {
79 | display: none !important;
80 | }
81 |
82 | /* Links
83 | ========================================================================== */
84 |
85 | /**
86 | * Remove the gray background color from active links in IE 10.
87 | */
88 |
89 | a {
90 | background-color: transparent;
91 | }
92 |
93 | /**
94 | * Improve readability when focused and also mouse hovered in all browsers.
95 | */
96 |
97 | a:active,
98 | a:hover {
99 | outline: 0;
100 | }
101 |
102 | /* Text-level semantics
103 | ========================================================================== */
104 |
105 | /**
106 | * Address styling not present in IE 8/9/10/11, Safari, and Chrome.
107 | */
108 |
109 | abbr[title] {
110 | border-bottom: 1px dotted;
111 | }
112 |
113 | /**
114 | * Address style set to `bolder` in Firefox 4+, Safari, and Chrome.
115 | */
116 |
117 | b,
118 | strong {
119 | font-weight: bold;
120 | }
121 |
122 | /**
123 | * Address styling not present in Safari and Chrome.
124 | */
125 |
126 | dfn {
127 | font-style: italic;
128 | }
129 |
130 | /**
131 | * Address variable `h1` font-size and margin within `section` and `article`
132 | * contexts in Firefox 4+, Safari, and Chrome.
133 | */
134 |
135 | h1 {
136 | font-size: 2em;
137 | margin: 0.67em 0;
138 | }
139 |
140 | /**
141 | * Address styling not present in IE 8/9.
142 | */
143 |
144 | mark {
145 | background: #ff0;
146 | color: #000;
147 | }
148 |
149 | /**
150 | * Address inconsistent and variable font size in all browsers.
151 | */
152 |
153 | small {
154 | font-size: 80%;
155 | }
156 |
157 | /**
158 | * Prevent `sub` and `sup` affecting `line-height` in all browsers.
159 | */
160 |
161 | sub,
162 | sup {
163 | font-size: 75%;
164 | line-height: 0;
165 | position: relative;
166 | vertical-align: baseline;
167 | }
168 |
169 | sup {
170 | top: -0.5em;
171 | }
172 |
173 | sub {
174 | bottom: -0.25em;
175 | }
176 |
177 | /* Embedded content
178 | ========================================================================== */
179 |
180 | /**
181 | * Remove border when inside `a` element in IE 8/9/10.
182 | */
183 |
184 | img {
185 | border: 0;
186 | }
187 |
188 | /**
189 | * Correct overflow not hidden in IE 9/10/11.
190 | */
191 |
192 | svg:not(:root) {
193 | overflow: hidden;
194 | }
195 |
196 | /* Grouping content
197 | ========================================================================== */
198 |
199 | /**
200 | * Address margin not present in IE 8/9 and Safari.
201 | */
202 |
203 | figure {
204 | margin: 1em 40px;
205 | }
206 |
207 | /**
208 | * Address differences between Firefox and other browsers.
209 | */
210 |
211 | hr {
212 | -moz-box-sizing: content-box;
213 | box-sizing: content-box;
214 | height: 0;
215 | }
216 |
217 | /**
218 | * Contain overflow in all browsers.
219 | */
220 |
221 | pre {
222 | overflow: auto;
223 | }
224 |
225 | /**
226 | * Address odd `em`-unit font size rendering in all browsers.
227 | */
228 |
229 | code,
230 | kbd,
231 | pre,
232 | samp {
233 | font-family: var(--font-monospace);
234 | font-size: 1em;
235 | }
236 |
237 | /* Forms
238 | ========================================================================== */
239 |
240 | /**
241 | * Known limitation: by default, Chrome and Safari on OS X allow very limited
242 | * styling of `select`, unless a `border` property is set.
243 | */
244 |
245 | /**
246 | * 1. Correct color not being inherited.
247 | * Known issue: affects color of disabled elements.
248 | * 2. Correct font properties not being inherited.
249 | * 3. Address margins set differently in Firefox 4+, Safari, and Chrome.
250 | */
251 |
252 | button,
253 | input,
254 | optgroup,
255 | select,
256 | textarea {
257 | color: inherit; /* 1 */
258 | font: inherit; /* 2 */
259 | margin: 0; /* 3 */
260 | }
261 |
262 | /**
263 | * Address `overflow` set to `hidden` in IE 8/9/10/11.
264 | */
265 |
266 | button {
267 | overflow: visible;
268 | }
269 |
270 | /**
271 | * Address inconsistent `text-transform` inheritance for `button` and `select`.
272 | * All other form control elements do not inherit `text-transform` values.
273 | * Correct `button` style inheritance in Firefox, IE 8/9/10/11, and Opera.
274 | * Correct `select` style inheritance in Firefox.
275 | */
276 |
277 | button,
278 | select {
279 | text-transform: none;
280 | }
281 |
282 | /**
283 | * 1. Avoid the WebKit bug in Android 4.0.* where (2) destroys native `audio`
284 | * and `video` controls.
285 | * 2. Correct inability to style clickable `input` types in iOS.
286 | * 3. Improve usability and consistency of cursor style between image-type
287 | * `input` and others.
288 | */
289 |
290 | button,
291 | html input[type="button"], /* 1 */
292 | input[type="reset"],
293 | input[type="submit"] {
294 | -webkit-appearance: button; /* 2 */
295 | cursor: pointer; /* 3 */
296 | }
297 |
298 | /**
299 | * Re-set default cursor for disabled elements.
300 | */
301 |
302 | button[disabled],
303 | html input[disabled] {
304 | cursor: default;
305 | }
306 |
307 | /**
308 | * Remove inner padding and border in Firefox 4+.
309 | */
310 |
311 | button::-moz-focus-inner,
312 | input::-moz-focus-inner {
313 | border: 0;
314 | padding: 0;
315 | }
316 |
317 | /**
318 | * Address Firefox 4+ setting `line-height` on `input` using `!important` in
319 | * the UA stylesheet.
320 | */
321 |
322 | input {
323 | line-height: normal;
324 | }
325 |
326 | /**
327 | * It's recommended that you don't attempt to style these elements.
328 | * Firefox's implementation doesn't respect box-sizing, padding, or width.
329 | *
330 | * 1. Address box sizing set to `content-box` in IE 8/9/10.
331 | * 2. Remove excess padding in IE 8/9/10.
332 | */
333 |
334 | input[type="checkbox"],
335 | input[type="radio"] {
336 | box-sizing: border-box; /* 1 */
337 | padding: 0; /* 2 */
338 | }
339 |
340 | /**
341 | * Fix the cursor style for Chrome's increment/decrement buttons. For certain
342 | * `font-size` values of the `input`, it causes the cursor style of the
343 | * decrement button to change from `default` to `text`.
344 | */
345 |
346 | input[type="number"]::-webkit-inner-spin-button,
347 | input[type="number"]::-webkit-outer-spin-button {
348 | height: auto;
349 | }
350 |
351 | /**
352 | * 1. Address `appearance` set to `searchfield` in Safari and Chrome.
353 | * 2. Address `box-sizing` set to `border-box` in Safari and Chrome
354 | * (include `-moz` to future-proof).
355 | */
356 |
357 | input[type="search"] {
358 | -webkit-appearance: textfield; /* 1 */
359 | -moz-box-sizing: content-box;
360 | -webkit-box-sizing: content-box; /* 2 */
361 | box-sizing: content-box;
362 | }
363 |
364 | /**
365 | * Remove inner padding and search cancel button in Safari and Chrome on OS X.
366 | * Safari (but not Chrome) clips the cancel button when the search input has
367 | * padding (and `textfield` appearance).
368 | */
369 |
370 | input[type="search"]::-webkit-search-cancel-button,
371 | input[type="search"]::-webkit-search-decoration {
372 | -webkit-appearance: none;
373 | }
374 |
375 | /**
376 | * Define consistent border, margin, and padding.
377 | */
378 |
379 | fieldset {
380 | border: 1px solid #c0c0c0;
381 | margin: 0 2px;
382 | padding: 0.35em 0.625em 0.75em;
383 | }
384 |
385 | /**
386 | * 1. Correct `color` not being inherited in IE 8/9/10/11.
387 | * 2. Remove padding so people aren't caught out if they zero out fieldsets.
388 | */
389 |
390 | legend {
391 | border: 0; /* 1 */
392 | padding: 0; /* 2 */
393 | }
394 |
395 | /**
396 | * Remove default vertical scrollbar in IE 8/9/10/11.
397 | */
398 |
399 | textarea {
400 | overflow: auto;
401 | }
402 |
403 | /**
404 | * Don't inherit the `font-weight` (applied by a rule above).
405 | * NOTE: the default cannot safely be changed in Chrome and Safari on OS X.
406 | */
407 |
408 | optgroup {
409 | font-weight: bold;
410 | }
411 |
412 | /* Tables
413 | ========================================================================== */
414 |
415 | /**
416 | * Remove most spacing between table cells.
417 | */
418 |
419 | table {
420 | border-collapse: collapse;
421 | border-spacing: 0;
422 | }
423 |
424 | td,
425 | th {
426 | padding: 0;
427 | }
428 |
--------------------------------------------------------------------------------
/docs/css/template.css:
--------------------------------------------------------------------------------
1 |
2 | .phpdocumentor-content {
3 | position: relative;
4 | display: flex;
5 | gap: var(--spacing-md);
6 | }
7 |
8 | .phpdocumentor-content > section:first-of-type {
9 | width: 75%;
10 | flex: 1 1 auto;
11 | }
12 |
13 | @media (min-width: 1900px) {
14 | .phpdocumentor-content > section:first-of-type {
15 | width: 100%;
16 | flex: 1 1 auto;
17 | }
18 | }
19 |
20 | .phpdocumentor .phpdocumentor-content__title {
21 | margin-top: 0;
22 | }
23 | .phpdocumentor-summary {
24 | font-style: italic;
25 | }
26 | .phpdocumentor-description {
27 | margin-bottom: var(--spacing-md);
28 | }
29 | .phpdocumentor-element {
30 | position: relative;
31 | }
32 |
33 | .phpdocumentor-element .phpdocumentor-element {
34 | border: 1px solid var(--primary-color-lighten);
35 | margin-bottom: var(--spacing-md);
36 | padding: var(--spacing-xs);
37 | border-radius: 5px;
38 | }
39 |
40 | .phpdocumentor-element.-deprecated .phpdocumentor-element__name {
41 | text-decoration: line-through;
42 | }
43 |
44 | @media (min-width: 550px) {
45 | .phpdocumentor-element .phpdocumentor-element {
46 | margin-bottom: var(--spacing-lg);
47 | padding: var(--spacing-md);
48 | }
49 | }
50 |
51 | .phpdocumentor-element__modifier {
52 | font-size: var(--text-xxs);
53 | padding: calc(var(--spacing-base-size) / 4) calc(var(--spacing-base-size) / 2);
54 | color: var(--text-color);
55 | background-color: var(--light-gray);
56 | border-radius: 3px;
57 | text-transform: uppercase;
58 | }
59 |
60 | .phpdocumentor .phpdocumentor-elements__header {
61 | margin-top: var(--spacing-xxl);
62 | margin-bottom: var(--spacing-lg);
63 | }
64 |
65 | .phpdocumentor .phpdocumentor-element__name {
66 | line-height: 1;
67 | margin-top: 0;
68 | font-weight: 300;
69 | font-size: var(--text-lg);
70 | word-break: break-all;
71 | margin-bottom: var(--spacing-sm);
72 | }
73 |
74 | @media (min-width: 550px) {
75 | .phpdocumentor .phpdocumentor-element__name {
76 | font-size: var(--text-xl);
77 | margin-bottom: var(--spacing-xs);
78 | }
79 | }
80 |
81 | @media (min-width: 1200px) {
82 | .phpdocumentor .phpdocumentor-element__name {
83 | margin-bottom: var(--spacing-md);
84 | }
85 | }
86 |
87 | .phpdocumentor-element__package,
88 | .phpdocumentor-element__extends,
89 | .phpdocumentor-element__implements {
90 | display: block;
91 | font-size: var(--text-xxs);
92 | font-weight: normal;
93 | opacity: .7;
94 | }
95 |
96 | .phpdocumentor-element__package .phpdocumentor-breadcrumbs {
97 | display: inline;
98 | }
99 | .phpdocumentor .phpdocumentor-signature {
100 | display: block;
101 | font-size: var(--text-sm);
102 | border: 1px solid #f0f0f0;
103 | }
104 |
105 | .phpdocumentor .phpdocumentor-signature.-deprecated .phpdocumentor-signature__name {
106 | text-decoration: line-through;
107 | }
108 |
109 | @media (min-width: 550px) {
110 | .phpdocumentor .phpdocumentor-signature {
111 | margin-left: calc(var(--spacing-xl) * -1);
112 | width: calc(100% + var(--spacing-xl));
113 | }
114 | }
115 |
116 | .phpdocumentor-table-of-contents {
117 | }
118 |
119 | .phpdocumentor-table-of-contents .phpdocumentor-table-of-contents__entry {
120 | margin-bottom: var(--spacing-xxs);
121 | margin-left: 2rem;
122 | display: flex;
123 | }
124 |
125 | .phpdocumentor-table-of-contents .phpdocumentor-table-of-contents__entry > a {
126 | flex: 0 1 auto;
127 | }
128 |
129 | .phpdocumentor-table-of-contents .phpdocumentor-table-of-contents__entry > span {
130 | flex: 1;
131 | white-space: nowrap;
132 | text-overflow: ellipsis;
133 | overflow: hidden;
134 | }
135 |
136 | .phpdocumentor-table-of-contents .phpdocumentor-table-of-contents__entry:after {
137 | content: '';
138 | height: 12px;
139 | width: 12px;
140 | left: 16px;
141 | position: absolute;
142 | }
143 | .phpdocumentor-table-of-contents .phpdocumentor-table-of-contents__entry.-private:after {
144 | background: url('data:image/svg+xml;utf8, ') no-repeat;
145 | }
146 | .phpdocumentor-table-of-contents .phpdocumentor-table-of-contents__entry.-protected:after {
147 | left: 13px;
148 | background: url('data:image/svg+xml;utf8, ') no-repeat;
149 | }
150 |
151 | .phpdocumentor-table-of-contents .phpdocumentor-table-of-contents__entry:before {
152 | width: 1.25rem;
153 | height: 1.25rem;
154 | line-height: 1.25rem;
155 | background: transparent url('data:image/svg+xml;utf8, ') no-repeat center center;
156 | content: '';
157 | position: absolute;
158 | left: 0;
159 | border-radius: 50%;
160 | font-weight: 600;
161 | color: white;
162 | text-align: center;
163 | font-size: .75rem;
164 | margin-top: .2rem;
165 | }
166 |
167 | .phpdocumentor-table-of-contents .phpdocumentor-table-of-contents__entry.-method:before {
168 | content: 'M';
169 | color: '';
170 | background-image: url('data:image/svg+xml;utf8, ');
171 | }
172 |
173 | .phpdocumentor-table-of-contents .phpdocumentor-table-of-contents__entry.-function:before {
174 | content: 'M';
175 | color: ' 96';
176 | background-image: url('data:image/svg+xml;utf8, ');
177 | }
178 |
179 | .phpdocumentor-table-of-contents .phpdocumentor-table-of-contents__entry.-property:before {
180 | content: 'P'
181 | }
182 |
183 | .phpdocumentor-table-of-contents .phpdocumentor-table-of-contents__entry.-constant:before {
184 | content: 'C';
185 | background-color: transparent;
186 | background-image: url('data:image/svg+xml;utf8, ');
187 | }
188 |
189 | .phpdocumentor-table-of-contents .phpdocumentor-table-of-contents__entry.-class:before {
190 | content: 'C'
191 | }
192 |
193 | .phpdocumentor-table-of-contents .phpdocumentor-table-of-contents__entry.-interface:before {
194 | content: 'I'
195 | }
196 |
197 | .phpdocumentor-table-of-contents .phpdocumentor-table-of-contents__entry.-trait:before {
198 | content: 'T'
199 | }
200 |
201 | .phpdocumentor-table-of-contents .phpdocumentor-table-of-contents__entry.-namespace:before {
202 | content: 'N'
203 | }
204 |
205 | .phpdocumentor-table-of-contents .phpdocumentor-table-of-contents__entry.-package:before {
206 | content: 'P'
207 | }
208 |
209 | .phpdocumentor-table-of-contents .phpdocumentor-table-of-contents__entry.-enum:before {
210 | content: 'E'
211 | }
212 |
213 | .phpdocumentor-table-of-contents dd {
214 | font-style: italic;
215 | margin-left: 2rem;
216 | }
217 | .phpdocumentor-element-found-in {
218 | display: none;
219 | }
220 |
221 | @media (min-width: 550px) {
222 | .phpdocumentor-element-found-in {
223 | display: block;
224 | font-size: var(--text-sm);
225 | color: gray;
226 | margin-bottom: 1rem;
227 | }
228 | }
229 |
230 | @media (min-width: 1200px) {
231 | .phpdocumentor-element-found-in {
232 | position: absolute;
233 | top: var(--spacing-sm);
234 | right: var(--spacing-sm);
235 | font-size: var(--text-sm);
236 | margin-bottom: 0;
237 | }
238 | }
239 |
240 | .phpdocumentor-element-found-in .phpdocumentor-element-found-in__source {
241 | flex: 0 1 auto;
242 | display: inline-flex;
243 | }
244 |
245 | .phpdocumentor-element-found-in .phpdocumentor-element-found-in__source:after {
246 | width: 1.25rem;
247 | height: 1.25rem;
248 | line-height: 1.25rem;
249 | background: transparent url('data:image/svg+xml;utf8, ') no-repeat center center;
250 | content: '';
251 | left: 0;
252 | border-radius: 50%;
253 | font-weight: 600;
254 | text-align: center;
255 | font-size: .75rem;
256 | margin-top: .2rem;
257 | }
258 | .phpdocumentor-class-graph {
259 | width: 100%; height: 600px; border:1px solid black; overflow: hidden
260 | }
261 |
262 | .phpdocumentor-class-graph__graph {
263 | width: 100%;
264 | }
265 | .phpdocumentor-tag-list__definition {
266 | display: flex;
267 | }
268 |
269 | .phpdocumentor-tag-link {
270 | margin-right: var(--spacing-sm);
271 | }
272 |
--------------------------------------------------------------------------------
/docs/files/src-exception-fileexistsexception.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | Path-php
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
49 |
50 |
51 |
52 |
53 |
56 |
94 |
95 |
96 |
97 |
99 |
100 |
101 | FileExistsException.php
102 |
103 |
104 |
105 |
106 |
107 |
108 |
109 |
110 | Table of Contents
111 |
112 |
113 |
114 |
115 |
116 |
117 |
118 |
119 | Classes
120 |
121 |
122 |
123 |
124 | FileExistsException
125 |
126 |
127 |
128 |
129 |
130 |
131 |
132 |
133 |
134 |
135 |
136 |
137 |
138 |
147 |
148 |
229 |
230 |
231 |
232 |
250 |
251 |
262 |
263 |
264 |
265 |
266 |
267 |
270 |
271 |
272 |
273 |
274 |
275 |
276 |
--------------------------------------------------------------------------------
/docs/files/src-exception-filenotfoundexception.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | Path-php
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
49 |
50 |
51 |
52 |
53 |
56 |
94 |
95 |
96 |
97 |
99 |
100 |
101 | FileNotFoundException.php
102 |
103 |
104 |
105 |
106 |
107 |
108 |
109 |
110 | Table of Contents
111 |
112 |
113 |
114 |
115 |
116 |
117 |
118 |
119 | Classes
120 |
121 |
122 |
123 |
124 | FileNotFoundException
125 |
126 |
127 |
128 |
129 |
130 |
131 |
132 |
133 |
134 |
135 |
136 |
137 |
138 |
147 |
148 |
229 |
230 |
231 |
232 |
250 |
251 |
262 |
263 |
264 |
265 |
266 |
267 |
270 |
271 |
272 |
273 |
274 |
275 |
276 |
--------------------------------------------------------------------------------
/docs/files/src-exception-ioexception.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | Path-php
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
49 |
50 |
51 |
52 |
53 |
56 |
94 |
95 |
96 |
97 |
99 |
100 |
101 | IOException.php
102 |
103 |
104 |
105 |
106 |
107 |
108 |
109 |
110 | Table of Contents
111 |
112 |
113 |
114 |
115 |
116 |
117 |
118 |
119 | Classes
120 |
121 |
122 |
123 |
124 | IOException
125 |
126 |
127 |
128 |
129 |
130 |
131 |
132 |
133 |
134 |
135 |
136 |
137 |
138 |
147 |
148 |
229 |
230 |
231 |
232 |
250 |
251 |
262 |
263 |
264 |
265 |
266 |
267 |
270 |
271 |
272 |
273 |
274 |
275 |
276 |
--------------------------------------------------------------------------------
/docs/files/src-path.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | Path-php
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
49 |
50 |
51 |
52 |
53 |
56 |
94 |
95 |
96 |
97 |
99 |
100 |
101 | Path.php
102 |
103 |
104 |
105 |
106 |
107 |
108 |
109 |
110 | Table of Contents
111 |
112 |
113 |
114 |
115 |
116 |
117 |
118 |
119 | Classes
120 |
121 |
122 |
123 |
124 | Path Represents a filesystem path.
125 |
126 |
127 |
128 |
129 |
130 |
131 |
132 |
133 |
134 |
135 |
136 |
137 |
138 |
147 |
148 |
229 |
230 |
231 |
232 |
250 |
251 |
262 |
263 |
264 |
265 |
266 |
267 |
270 |
271 |
272 |
273 |
274 |
275 |
276 |
--------------------------------------------------------------------------------
/docs/graphs/classes.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | Path-php
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
37 |
38 |
39 |
40 |
41 |
44 |
82 |
83 |
84 |
85 |
86 |
87 |
95 |
96 |
107 |
108 |
109 |
110 |
111 |
112 |
115 |
116 |
117 |
118 |
119 |
120 |
121 |
--------------------------------------------------------------------------------
/docs/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | Path-php
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
49 |
50 |
51 |
52 |
53 |
56 |
94 |
95 |
96 |
97 | Documentation
98 |
99 |
100 |
101 |
102 | Table of Contents
103 |
104 |
105 |
106 |
107 |
108 | Packages
109 |
110 |
111 |
112 |
113 | Application
114 | olinox14path
115 |
116 |
117 |
118 | Namespaces
119 |
120 |
121 |
122 |
123 | Path
124 |
125 |
126 |
127 |
128 |
129 |
130 |
131 |
132 |
133 |
134 |
135 |
136 |
137 |
138 |
139 |
140 |
151 |
152 |
153 |
154 |
155 |
156 |
159 |
160 |
161 |
162 |
163 |
164 |
165 |
--------------------------------------------------------------------------------
/docs/indices/files.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | Path-php
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
49 |
50 |
51 |
52 |
53 |
56 |
94 |
95 |
96 |
97 |
98 | Files
99 | F
100 |
104 | I
105 |
108 | P
109 |
112 |
113 |
114 |
125 |
126 |
127 |
128 |
129 |
130 |
133 |
134 |
135 |
136 |
137 |
138 |
139 |
--------------------------------------------------------------------------------
/docs/js/search.js:
--------------------------------------------------------------------------------
1 | // Search module for phpDocumentor
2 | //
3 | // This module is a wrapper around fuse.js that will use a given index and attach itself to a
4 | // search form and to a search results pane identified by the following data attributes:
5 | //
6 | // 1. data-search-form
7 | // 2. data-search-results
8 | //
9 | // The data-search-form is expected to have a single input element of type 'search' that will trigger searching for
10 | // a series of results, were the data-search-results pane is expected to have a direct UL child that will be populated
11 | // with rendered results.
12 | //
13 | // The search has various stages, upon loading this stage the data-search-form receives the CSS class
14 | // 'phpdocumentor-search--enabled'; this indicates that JS is allowed and indices are being loaded. It is recommended
15 | // to hide the form by default and show it when it receives this class to achieve progressive enhancement for this
16 | // feature.
17 | //
18 | // After loading this module, it is expected to load a search index asynchronously, for example:
19 | //
20 | //
21 | //
22 | // In this script the generated index should attach itself to the search module using the `appendIndex` function. By
23 | // doing it like this the page will continue loading, unhindered by the loading of the search.
24 | //
25 | // After the page has fully loaded, and all these deferred indexes loaded, the initialization of the search module will
26 | // be called and the form will receive the class 'phpdocumentor-search--active', indicating search is ready. At this
27 | // point, the input field will also have it's 'disabled' attribute removed.
28 | var Search = (function () {
29 | var fuse;
30 | var index = [];
31 | var options = {
32 | shouldSort: true,
33 | threshold: 0.6,
34 | location: 0,
35 | distance: 100,
36 | maxPatternLength: 32,
37 | minMatchCharLength: 1,
38 | keys: [
39 | "fqsen",
40 | "name",
41 | "summary",
42 | "url"
43 | ]
44 | };
45 |
46 | // Credit David Walsh (https://davidwalsh.name/javascript-debounce-function)
47 | // Returns a function, that, as long as it continues to be invoked, will not
48 | // be triggered. The function will be called after it stops being called for
49 | // N milliseconds. If `immediate` is passed, trigger the function on the
50 | // leading edge, instead of the trailing.
51 | function debounce(func, wait, immediate) {
52 | var timeout;
53 |
54 | return function executedFunction() {
55 | var context = this;
56 | var args = arguments;
57 |
58 | var later = function () {
59 | timeout = null;
60 | if (!immediate) func.apply(context, args);
61 | };
62 |
63 | var callNow = immediate && !timeout;
64 | clearTimeout(timeout);
65 | timeout = setTimeout(later, wait);
66 | if (callNow) func.apply(context, args);
67 | };
68 | }
69 |
70 | function close() {
71 | // Start scroll prevention: https://css-tricks.com/prevent-page-scrolling-when-a-modal-is-open/
72 | const scrollY = document.body.style.top;
73 | document.body.style.position = '';
74 | document.body.style.top = '';
75 | window.scrollTo(0, parseInt(scrollY || '0') * -1);
76 | // End scroll prevention
77 |
78 | var form = document.querySelector('[data-search-form]');
79 | var searchResults = document.querySelector('[data-search-results]');
80 |
81 | form.classList.toggle('phpdocumentor-search--has-results', false);
82 | searchResults.classList.add('phpdocumentor-search-results--hidden');
83 | var searchField = document.querySelector('[data-search-form] input[type="search"]');
84 | searchField.blur();
85 | }
86 |
87 | function search(event) {
88 | // Start scroll prevention: https://css-tricks.com/prevent-page-scrolling-when-a-modal-is-open/
89 | document.body.style.position = 'fixed';
90 | document.body.style.top = `-${window.scrollY}px`;
91 | // End scroll prevention
92 |
93 | // prevent enter's from autosubmitting
94 | event.stopPropagation();
95 |
96 | var form = document.querySelector('[data-search-form]');
97 | var searchResults = document.querySelector('[data-search-results]');
98 | var searchResultEntries = document.querySelector('[data-search-results] .phpdocumentor-search-results__entries');
99 |
100 | searchResultEntries.innerHTML = '';
101 |
102 | if (!event.target.value) {
103 | close();
104 | return;
105 | }
106 |
107 | form.classList.toggle('phpdocumentor-search--has-results', true);
108 | searchResults.classList.remove('phpdocumentor-search-results--hidden');
109 | var results = fuse.search(event.target.value, {limit: 25});
110 |
111 | results.forEach(function (result) {
112 | var entry = document.createElement("li");
113 | entry.classList.add("phpdocumentor-search-results__entry");
114 | entry.innerHTML += '\n";
115 | entry.innerHTML += '' + result.fqsen + " \n";
116 | entry.innerHTML += '' + result.summary + '
';
117 | searchResultEntries.appendChild(entry)
118 | });
119 | }
120 |
121 | function appendIndex(added) {
122 | index = index.concat(added);
123 |
124 | // re-initialize search engine when appending an index after initialisation
125 | if (typeof fuse !== 'undefined') {
126 | fuse = new Fuse(index, options);
127 | }
128 | }
129 |
130 | function init() {
131 | fuse = new Fuse(index, options);
132 |
133 | var form = document.querySelector('[data-search-form]');
134 | var searchField = document.querySelector('[data-search-form] input[type="search"]');
135 |
136 | var closeButton = document.querySelector('.phpdocumentor-search-results__close');
137 | closeButton.addEventListener('click', function() { close() }.bind(this));
138 |
139 | var searchResults = document.querySelector('[data-search-results]');
140 | searchResults.addEventListener('click', function() { close() }.bind(this));
141 |
142 | form.classList.add('phpdocumentor-search--active');
143 |
144 | searchField.setAttribute('placeholder', 'Search (Press "/" to focus)');
145 | searchField.removeAttribute('disabled');
146 | searchField.addEventListener('keyup', debounce(search, 300));
147 |
148 | window.addEventListener('keyup', function (event) {
149 | if (event.key === '/') {
150 | searchField.focus();
151 | }
152 | if (event.code === 'Escape') {
153 | close();
154 | }
155 | }.bind(this));
156 | }
157 |
158 | return {
159 | appendIndex,
160 | init
161 | }
162 | })();
163 |
164 | window.addEventListener('DOMContentLoaded', function () {
165 | var form = document.querySelector('[data-search-form]');
166 |
167 | // When JS is supported; show search box. Must be before including the search for it to take effect immediately
168 | form.classList.add('phpdocumentor-search--enabled');
169 | });
170 |
171 | window.addEventListener('load', function () {
172 | Search.init();
173 | });
174 |
--------------------------------------------------------------------------------
/docs/js/template.js:
--------------------------------------------------------------------------------
1 | (function(){
2 | window.addEventListener('load', () => {
3 | const el = document.querySelector('.phpdocumentor-on-this-page__content')
4 | if (!el) {
5 | return;
6 | }
7 |
8 | const observer = new IntersectionObserver(
9 | ([e]) => {
10 | e.target.classList.toggle("-stuck", e.intersectionRatio < 1);
11 | },
12 | {threshold: [1]}
13 | );
14 |
15 | observer.observe(el);
16 | })
17 | })();
18 |
--------------------------------------------------------------------------------
/docs/namespaces/default.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | Path-php
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
49 |
50 |
51 |
52 |
53 |
56 |
94 |
95 |
96 |
97 |
99 |
100 |
101 | API Documentation
102 |
103 |
104 |
105 | Table of Contents
106 |
107 |
108 |
109 |
110 |
111 |
112 | Namespaces
113 |
114 |
115 |
116 |
117 | Path
118 |
119 |
120 |
121 |
122 |
123 |
124 |
125 |
126 |
127 |
128 |
129 |
130 |
131 |
132 |
141 |
142 |
223 |
224 |
225 |
226 |
243 |
244 |
255 |
256 |
257 |
258 |
259 |
260 |
263 |
264 |
265 |
266 |
267 |
268 |
269 |
--------------------------------------------------------------------------------
/docs/namespaces/path-exception.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | Path-php
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
49 |
50 |
51 |
52 |
53 |
56 |
94 |
95 |
96 |
97 |
100 |
101 |
102 | Exception
103 |
104 |
105 |
106 | Table of Contents
107 |
108 |
109 |
110 |
111 |
112 |
113 |
114 |
115 | Classes
116 |
117 |
118 |
119 |
120 | FileExistsException FileNotFoundException IOException
121 |
122 |
123 |
124 |
125 |
126 |
127 |
128 |
129 |
130 |
131 |
132 |
141 |
142 |
223 |
224 |
225 |
226 |
244 |
245 |
256 |
257 |
258 |
259 |
260 |
261 |
264 |
265 |
266 |
267 |
268 |
269 |
270 |
--------------------------------------------------------------------------------
/docs/namespaces/path.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | Path-php
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
49 |
50 |
51 |
52 |
53 |
56 |
94 |
95 |
96 |
97 |
99 |
100 |
101 | Path
102 |
103 |
104 |
105 | Table of Contents
106 |
107 |
108 |
109 |
110 |
111 |
112 | Namespaces
113 |
114 |
115 |
116 |
117 | Exception
118 |
119 |
120 |
121 |
122 | Classes
123 |
124 |
125 |
126 |
127 | Path Represents a filesystem path.
128 |
129 |
130 |
131 |
132 |
133 |
134 |
135 |
136 |
137 |
138 |
139 |
148 |
149 |
230 |
231 |
232 |
233 |
251 |
252 |
263 |
264 |
265 |
266 |
267 |
268 |
271 |
272 |
273 |
274 |
275 |
276 |
277 |
--------------------------------------------------------------------------------
/docs/packages/Application.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | Path-php
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
49 |
50 |
51 |
52 |
53 |
56 |
94 |
95 |
96 |
97 |
99 |
100 |
101 | Application
102 |
103 |
104 |
105 | Table of Contents
106 |
107 |
108 |
109 |
110 |
111 |
112 |
113 |
114 | Classes
115 |
116 |
117 |
118 |
119 | FileExistsException FileNotFoundException IOException
120 |
121 |
122 |
123 |
124 |
125 |
126 |
127 |
128 |
129 |
130 |
131 |
140 |
141 |
222 |
223 |
224 |
225 |
243 |
244 |
255 |
256 |
257 |
258 |
259 |
260 |
263 |
264 |
265 |
266 |
267 |
268 |
269 |
--------------------------------------------------------------------------------
/docs/packages/default.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | Path-php
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
49 |
50 |
51 |
52 |
53 |
56 |
94 |
95 |
96 |
97 |
99 |
100 |
101 | API Documentation
102 |
103 |
104 |
105 | Table of Contents
106 |
107 |
108 |
109 |
110 |
111 | Packages
112 |
113 |
114 |
115 |
116 | Application
117 | olinox14path
118 |
119 |
120 |
121 |
122 |
123 |
124 |
125 |
126 |
127 |
128 |
129 |
130 |
131 |
132 |
133 |
142 |
143 |
224 |
225 |
226 |
227 |
244 |
245 |
256 |
257 |
258 |
259 |
260 |
261 |
264 |
265 |
266 |
267 |
268 |
269 |
270 |
--------------------------------------------------------------------------------
/docs/packages/olinox14path.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | Path-php
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
49 |
50 |
51 |
52 |
53 |
56 |
94 |
95 |
96 |
97 |
99 |
100 |
101 | olinox14path
102 |
103 |
104 |
105 | Table of Contents
106 |
107 |
108 |
109 |
110 |
111 |
112 |
113 |
114 | Classes
115 |
116 |
117 |
118 |
119 | Path Represents a filesystem path.
120 |
121 |
122 |
123 |
124 |
125 |
126 |
127 |
128 |
129 |
130 |
131 |
140 |
141 |
222 |
223 |
224 |
225 |
243 |
244 |
255 |
256 |
257 |
258 |
259 |
260 |
263 |
264 |
265 |
266 |
267 |
268 |
269 |
--------------------------------------------------------------------------------
/docs/reports/deprecated.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | Path-php » Deprecated elements
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
50 |
51 |
52 |
53 |
54 |
57 |
95 |
96 |
97 |
98 |
101 |
102 |
103 |
Deprecated
104 |
105 |
106 |
107 | No deprecated elements have been found in this project.
108 |
109 |
110 |
111 |
112 |
123 |
124 |
125 |
126 |
127 |
128 |
131 |
132 |
133 |
134 |
135 |
136 |
137 |
--------------------------------------------------------------------------------
/docs/reports/errors.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | Path-php » Compilation errors
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
50 |
51 |
52 |
53 |
54 |
57 |
95 |
96 |
97 |
98 |
101 |
102 |
103 |
Errors
104 |
105 |
106 |
No errors have been found in this project.
107 |
108 |
109 |
110 |
111 |
122 |
123 |
124 |
125 |
126 |
127 |
130 |
131 |
132 |
133 |
134 |
135 |
136 |
--------------------------------------------------------------------------------
/docs/reports/markers.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | Path-php » Markers
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
50 |
51 |
52 |
53 |
54 |
57 |
95 |
96 |
97 |
98 |
101 |
102 |
103 |
Markers
104 |
105 |
106 | No markers have been found in this project.
107 |
108 |
109 |
110 |
111 |
112 |
123 |
124 |
125 |
126 |
127 |
128 |
131 |
132 |
133 |
134 |
135 |
136 |
137 |
--------------------------------------------------------------------------------
/logo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/olinox14/path-php/5ae1217e1faf926a5184d370a92fd3db3386e24d/logo.png
--------------------------------------------------------------------------------
/phpdoc.dist.xml:
--------------------------------------------------------------------------------
1 |
2 |
7 | Path-php
8 |
9 | docs
10 | .phpdoc/cache
11 |
12 |
13 |
14 |
15 | src/Exception
16 | src/Path.php
17 |
18 |
19 |
20 |
--------------------------------------------------------------------------------
/phpstan.neon:
--------------------------------------------------------------------------------
1 | parameters:
2 | level: 6
3 | paths:
4 | - src/Exception
5 | - src/Path.php
--------------------------------------------------------------------------------
/phpunit.xml:
--------------------------------------------------------------------------------
1 |
2 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 | tests/unit
16 |
17 |
18 |
19 |
20 |
21 | src/Path.php
22 |
23 |
24 |
25 |
26 |
27 |
28 |
--------------------------------------------------------------------------------
/readme.md:
--------------------------------------------------------------------------------
1 | [](https://github.com/olinox14/path-php/actions/workflows/php.yml)
2 | [](https://coveralls.io/github/olinox14/path-php?branch=master)
3 | [](https://packagist.org/packages/olinox14/path-php)
4 | [](https://packagist.org/packages/olinox14/path-php)
5 | [](https://packagist.org/packages/olinox14/path-php)
6 |
7 | # Path-php
8 |
9 | An **intuitive**, **standalone**, and **object-oriented** library for file and path operations.
10 |
11 | **See the full documentation here : [Documentation](https://path-php.net/)**
12 |
13 | ```php
14 | parent();
20 | var_dump($dir->dirs());
21 |
22 |
23 | // Get the path of the working directory, iterate over its files and change their permissions
24 | $path = new Path('.');
25 |
26 | foreach($path->files() as $file) {
27 | $file->chmod(755);
28 | }
29 |
30 |
31 | // Put content into a file
32 | $path = (new Path('.'))->append('readme.md');
33 |
34 | $path->putContent('new readme content');
35 |
36 | // And many more...
37 | ```
38 |
39 |
40 | ## Requirement
41 |
42 | path-php requires **php8.0 or ulterior versions**.
43 |
44 | ## Installation
45 |
46 | Install with composer :
47 |
48 | composer require olinox14/path-php
49 |
50 | ## Usage
51 |
52 | Import the Path class :
53 |
54 | ```php
55 | use Path\Path;
56 | ```
57 |
58 | Instantiate with some path :
59 |
60 | ```php
61 | $path = new Path('./foo');
62 | $path = new Path('/foo/bar/file.ext');
63 | $path = new Path(__file__);
64 | ```
65 |
66 | And use it as needed. For example, if you want to rename all the html files in the directory where
67 | your current script lies into .md files :
68 |
69 | ```php
70 | $path = new Path(__file__);
71 |
72 | $dir = $path->parent();
73 |
74 | foreach ($dir->files() as $file) {
75 | if ($file->ext() === 'html') {
76 | $file->rename($file->name() . '.md');
77 | }
78 | }
79 | ```
80 |
81 | ## Contribute
82 |
83 | ### Git branching
84 |
85 | Contributions shall follow the [gitflow](https://www.gitkraken.com/learn/git/git-flow) pattern.
86 |
87 | ### Tests
88 |
89 | #### First build
90 |
91 | > Default php version in the dockerfile is set to be the oldest actively supported
92 | > version of php, but you can change it locally before building your container.
93 |
94 | Build your docker container :
95 |
96 | docker build -t path .
97 |
98 | Run it (name can be changed):
99 |
100 | # On Linux
101 | docker run -v "$(pwd)":/path --name path path
102 |
103 | # On Windows
104 | docker run -d -v "%cd%:/path" --name path path
105 |
106 | Execute it and install dependencies :
107 |
108 | docker exec -it path bash
109 | composer install
110 |
111 | Run the unit tests :
112 |
113 | XDEBUG_MODE=coverage vendor/bin/phpunit -c phpunit.xml
114 |
115 | #### Run on a built container
116 |
117 | If you've already built your container, start it and run unit tests with :
118 |
119 | docker start path
120 | docker exec -it path bash
121 | XDEBUG_MODE=coverage vendor/bin/phpunit -c phpunit.xml
122 |
123 | ### Run code quality tools
124 |
125 | #### Phpstan
126 |
127 | Build and start the docker as explained in the unit tests section, then run :
128 |
129 | vendor/bin/phpstan analyse --memory-limit=-1
130 |
131 | > see: https://phpstan.org/
132 |
133 | #### CS Fixer
134 |
135 | Build and start the docker as explained in the unit tests section, then run :
136 |
137 | vendor/bin/php-cs-fixer fix src
138 |
139 | > see https://github.com/PHP-CS-Fixer/PHP-CS-Fixer
140 |
141 | ### Generate documentation
142 |
143 | To install and run [phpdoc](https://docs.phpdoc.org/3.0/) :
144 |
145 | docker pull phpdoc/phpdoc
146 |
147 | # On Linux
148 | docker run --rm -v "$(pwd):/data" "phpdoc/phpdoc:3"
149 |
150 | # On Windows
151 | docker run --rm -v "%cd%:/data" "phpdoc/phpdoc:3"
152 |
153 | If you're on Linux, you could create an alias with :
154 |
155 | alias phpdoc="docker run --rm -v $(pwd):/data phpdoc/phpdoc:3"
156 |
157 | ## Licence
158 |
159 | Path-php is under the [MIT](http://opensource.org/licenses/MIT) licence.
160 |
--------------------------------------------------------------------------------
/src/BuiltinProxy.php:
--------------------------------------------------------------------------------
1 | code}]: {$this->message}\n";
18 | }
19 | }
20 |
--------------------------------------------------------------------------------
/src/Exception/FileNotFoundException.php:
--------------------------------------------------------------------------------
1 | code}]: {$this->message}\n";
18 | }
19 | }
20 |
--------------------------------------------------------------------------------
/src/Exception/IOException.php:
--------------------------------------------------------------------------------
1 | code}]: {$this->message}\n";
18 | }
19 | }
20 |
--------------------------------------------------------------------------------