Go to the documentation of this file.
109 if ( $this->path ===
false ) {
134 abstract public function toHtml( $options = [] );
158 return ( !$this->
isError() && ( $this->path || $this->path ===
null ) );
168 return ( !$this->
isError() && $this->path ===
null );
180 } elseif ( $this->path ===
null ) {
181 return $this->file->getLocalRefPath();
183 $be = $this->file->getRepo()->getBackend();
185 $fsFile = $be->getLocalReference( [
'src' => $this->path ] );
187 return $fsFile ? $fsFile->getPath() :
false;
201 if ( !$this->path ) {
204 $be = $this->file->getRepo()->getBackend();
206 $be->streamFile( [
'src' => $this->path,
'headers' => $headers ] ) );
231 protected function linkWrap( $linkAttribs, $contents ) {
232 if ( $linkAttribs ) {
233 return Xml::tags(
'a', $linkAttribs, $contents );
245 if ( is_array( $params ) ) {
250 if ( $this->page && $this->page !== 1 ) {
257 if ( is_string( $params ) && $params !==
'' ) {
262 'href' => $this->file->getTitle()->getLocalURL( $query ),
266 $attribs[
'title'] =
$title;
static newFatal( $message,... $parameters)
Factory function for fatal errors.
static extensionFromPath( $path, $case='lowercase')
Get the final extension from a storage or FS path.
static stream( $fname, $headers=[], $sendErrors=true, $optHeaders=[], $flags=0)
Stream a file to the browser, adding all the headings and fun stuff.
Implements some public methods and some protected utility functions which are required by multiple ch...
static isStoragePath( $path)
Check if a given path is a "mwstore://" path.
static wrap( $sv)
Succinct helper method to wrap a StatusValue.
static newGood( $value=null)
Factory function for good results.
static tags( $element, $attribs, $contents)
Same as Xml::element(), but does not escape contents.
wfArrayToCgi( $array1, $array2=null, $prefix='')
This function takes one or two arrays as input, and returns a CGI-style string, e....