Final Class Yiisoft\Config\Composer\Options
| Inheritance | Yiisoft\Config\Composer\Options |
|---|
Public Methods
Constants
| Constant | Value | Description | Defined By |
|---|---|---|---|
| DEFAULT_CONFIG_DIRECTORY | '' | Yiisoft\Config\Composer\Options | |
| DEFAULT_ENVIRONMENT | '/' | Yiisoft\Config\Composer\Options | |
| DEFAULT_MERGE_PLAN_FILE | '.merge-plan.php' | Yiisoft\Config\Composer\Options | |
| DEFAULT_PACKAGE_TYPES | [ 'library', 'composer-plugin', ] | Yiisoft\Config\Composer\Options | |
| DEFAULT_VENDOR_DIRECTORY | 'vendor' | Yiisoft\Config\Composer\Options | |
| ROOT_PACKAGE_NAME | '/' | Yiisoft\Config\Composer\Options | |
| VENDOR_OVERRIDE_PACKAGE_NAME | '//' | Yiisoft\Config\Composer\Options |
Method Details
| public mixed __construct ( array $extra ) | ||
| $extra | array | |
public function __construct(array $extra)
{
if (!isset($extra['config-plugin-options']) || !is_array($extra['config-plugin-options'])) {
return;
}
$options = $extra['config-plugin-options'];
if (!empty($options['merge-plan-file'])) {
$this->mergePlanFile = (string) $options['merge-plan-file'];
}
if (isset($options['build-merge-plan'])) {
$this->buildMergePlan = (bool) $options['build-merge-plan'];
}
if (isset($options['vendor-override-layer'])) {
$this->vendorOverrideLayerPackages = array_filter(
(array) $options['vendor-override-layer'],
static fn(mixed $value): bool => is_string($value),
);
}
if (isset($options['source-directory'])) {
$this->sourceDirectory = $this->normalizePath((string) $options['source-directory']);
}
if (isset($options['package-types'])) {
$this->packageTypes = array_filter(
(array) $options['package-types'],
static fn(mixed $value): bool => is_string($value),
);
}
}
| public boolean buildMergePlan ( ) |
public function buildMergePlan(): bool
{
return $this->buildMergePlan;
}
| public static boolean containsWildcard ( string $file ) | ||
| $file | string | |
public static function containsWildcard(string $file): bool
{
return str_contains($file, '*');
}
| public static boolean isOptional ( string $file ) | ||
| $file | string | |
public static function isOptional(string $file): bool
{
return str_starts_with($file, '?');
}
| public static boolean isVariable ( string $file ) | ||
| $file | string | |
public static function isVariable(string $file): bool
{
return str_starts_with($file, '$');
}
| public string mergePlanFile ( ) |
public function mergePlanFile(): string
{
return $this->mergePlanFile;
}
| public string[] packageTypes ( ) |
public function packageTypes(): array
{
return $this->packageTypes;
}
| public string sourceDirectory ( ) |
public function sourceDirectory(): string
{
return $this->sourceDirectory;
}
| public string[] vendorOverrideLayerPackages ( ) |
public function vendorOverrideLayerPackages(): array
{
return $this->vendorOverrideLayerPackages;
}
Signup or Login in order to comment.