1<?php 2 3 4namespace ComboStrap; 5 6/** 7 * Interface Path 8 * @package ComboStrap 9 * 10 * An interface that implements path operation 11 * 12 * The {@link Path::toString()} function is just the path part (no other URI query parameters) 13 * 14 * TODO: because a path should be able to go to an URI format, it should also allow query parameters 15 * We could then add a `toPath` function to {@link DokuwikiUrl} and delete the tag attributes 16 * as parameter of all {@link MediaLink::createMediaLinkFromPath()} creator function 17 */ 18interface Path 19{ 20 21 function getExtension(); 22 23 function getLastNameWithoutExtension(); 24 25 function getScheme(); 26 27 /** 28 * The last name of the path with or without the extension 29 * 30 * The Path class does not have a notion of "extension" 31 * because the file does not have one but we provide the 32 * {@link PathAbs::getExtension()} as utility 33 * 34 * @return mixed 35 */ 36 function getLastName(); 37 38 function getNames(); 39 40 function getParent(): ?Path; 41 42 function toString(); 43 44 function toAbsolutePath(): Path; 45 46 /** 47 * @return Mime the mime from the extension 48 */ 49 function getMime(): ?Mime; 50} 51