abstract class CdbReader {
/**
* Open a file and return a subclass instance
+ *
+ * @param $fileName string
+ *
+ * @return CdbReader
*/
public static function open( $fileName ) {
if ( self::haveExtension() ) {
/**
* Returns true if the native extension is available
+ *
+ * @return bool
*/
public static function haveExtension() {
if ( !function_exists( 'dba_handlers' ) ) {
/**
* Open a writer and return a subclass instance.
* The user must have write access to the directory, for temporary file creation.
+ *
+ * @param $fileName string
+ *
+ * @return bool
*/
public static function open( $fileName ) {
if ( CdbReader::haveExtension() ) {
$this->urlArr = $urlArr;
}
+ /**
+ * @param $title Title
+ *
+ * @return SquidUpdate
+ */
static function newFromLinksTo( &$title ) {
global $wgMaxSquidPurgeTitles;
wfProfileIn( __METHOD__ );
/**
* Create a SquidUpdate from an array of Title objects, or a TitleArray object
+ *
+ * @param $titles array
+ * @param $urlArr array
+ *
+ * @return SquidUpdate
*/
static function newFromTitles( $titles, $urlArr = array() ) {
global $wgMaxSquidPurgeTitles;
return new SquidUpdate( $urlArr );
}
+ /**
+ * @param $title Title
+ *
+ * @return SquidUpdate
+ */
static function newSimplePurge( &$title ) {
$urlArr = $title->getSquidURLs();
return new SquidUpdate( $urlArr );
SquidUpdate::purge( $this->urlArr );
}
- /* Purges a list of Squids defined in $wgSquidServers.
- $urlArr should contain the full URLs to purge as values
- (example: $urlArr[] = 'http://my.host/something')
- XXX report broken Squids per mail or log */
-
+ /**
+ * Purges a list of Squids defined in $wgSquidServers.
+ * $urlArr should contain the full URLs to purge as values
+ * (example: $urlArr[] = 'http://my.host/something')
+ * XXX report broken Squids per mail or log
+ *
+ * @param $urlArr array
+ * @return void
+ */
static function purge( $urlArr ) {
global $wgSquidServers, $wgHTCPMulticastAddress, $wgHTCPPort;
global $wgHTCPMulticastAddress, $wgHTCPMulticastTTL, $wgHTCPPort;
wfProfileIn( __METHOD__ );
- $htcpOpCLR = 4; // HTCP CLR
+ $htcpOpCLR = 4; // HTCP CLR
// FIXME PHP doesn't support these socket constants (include/linux/in.h)
if( !defined( "IPPROTO_IP" ) ) {
*
* Client functions should not need to call this.
*
+ * @param $url string
+ *
* @return string
*/
static function expand( $url ) {