2023-04-15 18:45:11 +08:00
|
|
|
<?php
|
|
|
|
|
|
|
|
|
|
declare(strict_types=1);
|
|
|
|
|
|
|
|
|
|
namespace SPC\builder\extension;
|
|
|
|
|
|
|
|
|
|
use SPC\builder\Extension;
|
|
|
|
|
use SPC\util\CustomExt;
|
|
|
|
|
|
|
|
|
|
#[CustomExt('mbstring')]
|
|
|
|
|
class mbstring extends Extension
|
|
|
|
|
{
|
2025-05-21 12:01:00 +07:00
|
|
|
public function getConfigureArg(bool $shared = false): string
|
2023-04-15 18:45:11 +08:00
|
|
|
{
|
|
|
|
|
$arg = '--enable-mbstring';
|
|
|
|
|
if ($this->builder->getExt('mbregex') === null) {
|
|
|
|
|
$arg .= ' --disable-mbregex';
|
2024-02-23 11:41:35 +08:00
|
|
|
} else {
|
|
|
|
|
$arg .= ' --enable-mbregex';
|
2023-04-15 18:45:11 +08:00
|
|
|
}
|
2023-04-29 18:59:47 +08:00
|
|
|
return $arg;
|
2023-04-15 18:45:11 +08:00
|
|
|
}
|
2025-05-20 20:00:37 +07:00
|
|
|
|
|
|
|
|
public function getUnixConfigureArg(bool $shared = false): string
|
|
|
|
|
{
|
|
|
|
|
$arg = '--enable-mbstring';
|
|
|
|
|
if ($this->builder->getExt('mbregex') === null) {
|
|
|
|
|
$arg .= ' --disable-mbregex';
|
|
|
|
|
} else {
|
|
|
|
|
$arg .= ' --enable-mbregex';
|
|
|
|
|
}
|
|
|
|
|
return $arg;
|
|
|
|
|
}
|
2023-04-15 18:45:11 +08:00
|
|
|
}
|