MediaWiki
master
ComposerVendorHtaccessCreator.php
Go to the documentation of this file.
1
<?php
21
namespace
MediaWiki\Composer
;
22
31
class
ComposerVendorHtaccessCreator
{
32
36
public
static
function
onEvent
() {
37
$fname = dirname( dirname( __DIR__ ) ) .
"/vendor/.htaccess"
;
38
if
( file_exists( $fname ) ) {
39
// Already exists
40
return
;
41
}
42
43
file_put_contents( $fname,
"Require all denied\n"
);
44
}
45
}
MediaWiki\Composer\ComposerVendorHtaccessCreator
Creates a .htaccess in the vendor/ directory to prevent web access.
Definition
ComposerVendorHtaccessCreator.php:31
MediaWiki\Composer\ComposerVendorHtaccessCreator\onEvent
static onEvent()
Handle post-install-cmd and post-update-cmd hooks.
Definition
ComposerVendorHtaccessCreator.php:36
MediaWiki\Composer
This program is free software; you can redistribute it and/or modify it under the terms of the GNU Ge...
Definition
ComposerPhpunitXmlCoverageEdit.php:19
includes
composer
ComposerVendorHtaccessCreator.php
Generated on Fri Apr 26 2024 03:22:57 for MediaWiki by
1.10.0