-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
php-simputils-109 Release of 1.1.3 (#110)
* php-simputils-109 Release of 1.1.3 Implemented nice functionality of batch/extract for `Box` Closes #108 * php-simputils-109 Release of 1.1.3 Some adjustments and implementations * php-simputils-109 Release of 1.1.3 Very promising code * php-simputils-109 Release of 1.1.3 Preparing for the release * php-simputils-109 Release of 1.1.3 Release is almost ready
- Loading branch information
1 parent
8db25d8
commit 32be00e
Showing
30 changed files
with
1,115 additions
and
149 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
<?php | ||
|
||
namespace spaf\simputils\components\execenvs; | ||
|
||
use spaf\simputils\generic\SimpleObject; | ||
use spaf\simputils\interfaces\ExecEnvHandlerInterface; | ||
use spaf\simputils\Str; | ||
|
||
/** | ||
* This is just an example of the custom Exec-Env handler. | ||
* It will return true or false that is specified from `$what_to_return` | ||
* field. Might be in rare cases useful for debugging. | ||
* | ||
*/ | ||
class DummyExecEnvHandler extends SimpleObject implements ExecEnvHandlerInterface { | ||
|
||
const EE_DEFAULT_NAME = 'dummy-exec-env'; | ||
|
||
public function __construct( | ||
public bool $what_to_return = true, | ||
public string $ee_name = self::EE_DEFAULT_NAME, | ||
public bool $include_signature = true, | ||
) {} | ||
|
||
public function is(string $val): bool { | ||
return $this->what_to_return; | ||
} | ||
|
||
public function __toString(): string { | ||
$res = Str::from($this->what_to_return); | ||
if ($this->include_signature) { | ||
return "{$this->ee_name}#{$res}"; | ||
} | ||
|
||
return "{$this->ee_name}"; | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
<?php | ||
|
||
namespace spaf\simputils\exceptions; | ||
|
||
use Exception; | ||
|
||
class ExecEnvException extends Exception { | ||
|
||
} |
Oops, something went wrong.