mirror of
https://github.com/crazywhalecc/static-php-cli.git
synced 2026-07-09 09:55:37 +08:00
v3 base
This commit is contained in:
43
src/StaticPHP/Toolchain/Interface/ToolchainInterface.php
Normal file
43
src/StaticPHP/Toolchain/Interface/ToolchainInterface.php
Normal file
@@ -0,0 +1,43 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace StaticPHP\Toolchain\Interface;
|
||||
|
||||
/**
|
||||
* Interface for toolchain implementations
|
||||
*
|
||||
* This interface defines the contract for toolchain classes that handle
|
||||
* environment initialization and setup for different build targets.
|
||||
*/
|
||||
interface ToolchainInterface
|
||||
{
|
||||
/**
|
||||
* Initialize the environment for the given target.
|
||||
*
|
||||
* This method should set up any necessary environment variables,
|
||||
* paths, or configurations required for the build process.
|
||||
*/
|
||||
public function initEnv(): void;
|
||||
|
||||
/**
|
||||
* Perform actions after the environment has been initialized for the given target.
|
||||
*
|
||||
* This method is called after initEnv() and can be used for any
|
||||
* post-initialization setup or validation.
|
||||
*/
|
||||
public function afterInit(): void;
|
||||
|
||||
/**
|
||||
* Returns the compiler name and version for toolchains.
|
||||
*
|
||||
* If the toolchain does not support compiler information,
|
||||
* this method can return null.
|
||||
*/
|
||||
public function getCompilerInfo(): ?string;
|
||||
|
||||
/**
|
||||
* Returns whether the toolchain with target is built for full static linking.
|
||||
*/
|
||||
public function isStatic(): bool;
|
||||
}
|
||||
Reference in New Issue
Block a user