MediaWiki
master
ComposerVendorHtaccessCreator.php
Go to the documentation of this file.
1
<?php
8
namespace
MediaWiki\Composer
;
9
18
class
ComposerVendorHtaccessCreator
{
19
23
public
static
function
onEvent
() {
24
$fname = dirname( dirname( __DIR__ ) ) .
"/vendor/.htaccess"
;
25
if
( file_exists( $fname ) ) {
26
// Already exists
27
return
;
28
}
29
30
file_put_contents( $fname,
31
"Require all denied\n"
.
32
"Satisfy All\n"
);
33
}
34
}
MediaWiki\Composer\ComposerVendorHtaccessCreator
Creates a .htaccess in the vendor/ directory to prevent web access.
Definition
ComposerVendorHtaccessCreator.php:18
MediaWiki\Composer\ComposerVendorHtaccessCreator\onEvent
static onEvent()
Handle post-install-cmd and post-update-cmd hooks.
Definition
ComposerVendorHtaccessCreator.php:23
MediaWiki\Composer
Copyright (C) 2017 Kunal Mehta legoktm@debian.org
Definition
ComposerLaunchParallel.php:5
includes
Composer
ComposerVendorHtaccessCreator.php
Generated on Mon Sep 7 2026 08:25:15 for MediaWiki by
1.10.0