MediaWiki REL1_41
FileDependency Class Reference

Depend on a file. More...

Inherits CacheDependency.

Collaboration diagram for FileDependency:

Public Member Functions

 __construct ( $filename, $timestamp=null)
 Create a file dependency.
 
 __sleep ()
 
 isExpired ()
 Returns true if the dependency is expired, false otherwise.
 
 loadDependencyValues ()
 Hook to perform any expensive pre-serialize loading of dependency values.
 

Detailed Description

Depend on a file.

Stability: newable

Definition at line 29 of file FileDependency.php.

Constructor & Destructor Documentation

◆ __construct()

FileDependency::__construct ( $filename,
$timestamp = null )

Create a file dependency.

Stability: stable
to call
Parameters
string$filenameThe name of the file, preferably fully qualified
null | false | int$timestampThe unix last modified timestamp, or false if the file does not exist. If omitted, the timestamp will be loaded from the file.

A dependency on a nonexistent file will be triggered when the file is created. A dependency on an existing file will be triggered when the file is changed.

Definition at line 47 of file FileDependency.php.

Member Function Documentation

◆ __sleep()

FileDependency::__sleep ( )
Returns
array

Definition at line 55 of file FileDependency.php.

References loadDependencyValues().

◆ isExpired()

FileDependency::isExpired ( )

Returns true if the dependency is expired, false otherwise.

Returns
bool

Reimplemented from CacheDependency.

Definition at line 71 of file FileDependency.php.

References wfDebug().

◆ loadDependencyValues()

FileDependency::loadDependencyValues ( )

Hook to perform any expensive pre-serialize loading of dependency values.

Stability: stable
to override

Reimplemented from CacheDependency.

Definition at line 61 of file FileDependency.php.

Referenced by __sleep().


The documentation for this class was generated from the following file: