WordPress at a glance
function is not described

Composer\Installers

OxidInstaller::prepareVendorDirectory() protected WC 1.0

Makes sure there is a vendormetadata.php file inside the vendor folder if there is a vendor folder.

{} It's a method of the class: OxidInstaller{}

No Hooks.

Return

null. Nothing.

Usage

// protected - for code of main (parent) or child class
$result = $this->prepareVendorDirectory( $installPath );
$installPath(string) (required)
-

Code of OxidInstaller::prepareVendorDirectory() WC 5.3.0

<?php
protected function prepareVendorDirectory($installPath)
{
	$matches = '';
	$hasVendorDirectory = preg_match(self::VENDOR_PATTERN, $installPath, $matches);
	if (!$hasVendorDirectory) {
		return;
	}

	$vendorDirectory = $matches['vendor'];
	$vendorPath = getcwd() . '/modules/' . $vendorDirectory;
	if (!file_exists($vendorPath)) {
		mkdir($vendorPath, 0755, true);
	}

	$vendorMetaDataPath = $vendorPath . '/vendormetadata.php';
	touch($vendorMetaDataPath);
}