mirror of
https://github.com/crazywhalecc/static-php-cli.git
synced 2026-07-06 16:25:39 +08:00
add library, extension patch methods base
This commit is contained in:
@@ -135,6 +135,7 @@ abstract class LibraryBase
|
||||
// 传入 true,表明直接编译
|
||||
if ($force_build) {
|
||||
logger()->info('Building required library [' . static::NAME . ']');
|
||||
$this->patchBeforeBuild();
|
||||
$this->build();
|
||||
return BUILD_STATUS_OK;
|
||||
}
|
||||
@@ -162,6 +163,14 @@ abstract class LibraryBase
|
||||
return BUILD_STATUS_ALREADY;
|
||||
}
|
||||
|
||||
/**
|
||||
* Patch before build, overwrite this and return true to patch libs
|
||||
*/
|
||||
public function patchBeforeBuild(): bool
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取构建当前 lib 的 Builder 对象
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user