KWeb
6.4
|
This class helps to handle file paths. More...
Public Member Functions | |
__construct ($path, $type=false, $rootDir=false) | |
newPath ($path, $type=false) | |
Returns new KWebPath object, with specified path and type, and all options cloned from current object. | |
getPathUri () | |
Returns path Uri, for use with createFromUri(), or to store in database. | |
__toString () | |
isEmpty () | |
getRootDir () | |
getPath () | |
Returns path, as passed to this function (without uri descriptor) | |
getType () | |
Returns path type. | |
getFilePath () | |
Returns filepath as absolute path, or url. | |
getExtension ($withDot=true) | |
getUrl ($useMirror=true) | |
Returns URL to this file. | |
canMirrorFile () | |
getFileMirrors () | |
getFileSize () | |
isValidLocalFile () | |
isUrl () | |
getPreview ($imgPreview, array $options=array()) | |
Returns preview result for this file. | |
getContentType ($default= 'application/binary') | |
Static Public Member Functions | |
static | createFromUri ($uri, $rootDir=false) |
static | extractExtension ($url, $withDot=true) |
Data Fields | |
const | FILE = 'file' |
file://relative_path | |
const | PATH = 'path' |
relative_path or /absolute_path | |
const | URL = 'url' |
http://url.com | |
const | SCRIPT = 'script' |
script://relative_path{{with scripting}} | |
const | NONE = false |
const | UNKNOWN = 'unknown' |
$rootDir | |
$scriptVars | |
$mirror = false | |
$allowedUrlProtocols | |
Static Public Attributes | |
static | $contentTypes |
Protected Member Functions | |
parseUri ($uri) | |
Protected Attributes | |
$path | |
$type |
This class helps to handle file paths.
KWebPath::__construct | ( | $ | path, |
$ | type = false , |
||
$ | rootDir = false |
||
) |
KWebPath::__toString | ( | ) |
KWebPath::canMirrorFile | ( | ) |
static KWebPath::createFromUri | ( | $ | uri, |
$ | rootDir = false |
||
) | [static] |
static KWebPath::extractExtension | ( | $ | url, |
$ | withDot = true |
||
) | [static] |
KWebPath::getContentType | ( | $ | default = 'application/binary' | ) |
KWebPath::getExtension | ( | $ | withDot = true | ) |
KWebPath::getFileMirrors | ( | ) |
KWebPath::getFilePath | ( | ) |
Returns filepath as absolute path, or url.
KWebPath::getFileSize | ( | ) |
KWebPath::getPath | ( | ) |
Returns path, as passed to this function (without uri descriptor)
KWebPath::getPathUri | ( | ) |
Returns path Uri, for use with createFromUri(), or to store in database.
KWebPath::getPreview | ( | $ | imgPreview, |
array $ | options = array() |
||
) |
Returns preview result for this file.
$imgPreview | ImgPreview instance, or instance name |
KWebPath::getRootDir | ( | ) |
KWebPath::getType | ( | ) |
Returns path type.
KWebPath::getUrl | ( | $ | useMirror = true | ) |
Returns URL to this file.
KWebPath::isEmpty | ( | ) |
KWebPath::isUrl | ( | ) |
KWebPath::isValidLocalFile | ( | ) |
KWebPath::newPath | ( | $ | path, |
$ | type = false |
||
) |
KWebPath::parseUri | ( | $ | uri | ) | [protected] |
KWebPath::$allowedUrlProtocols |
array( 'http', 'https' )
KWebPath::$contentTypes [static] |
array( '/^jpe?g$/' => 'image/jpeg', '/^png$/' => 'image/png', '/^gif$/' => 'image/gif', '/^html$/' => 'text/html', )
KWebPath::$mirror = false |
KWebPath::$path [protected] |
KWebPath::$rootDir |
KWebPath::$scriptVars |
KWebPath::$type [protected] |
const KWebPath::FILE = 'file' |
const KWebPath::NONE = false |
const KWebPath::PATH = 'path' |
relative_path or /absolute_path
const KWebPath::SCRIPT = 'script' |
script://relative_path{{with scripting}}
const KWebPath::UNKNOWN = 'unknown' |
const KWebPath::URL = 'url' |