This file contains hidden or 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
<?php | |
class ClassA | |
{ | |
public const FRIEND_CLASSES = [Factory::class]; | |
protected function __construct() {} | |
} | |
trait Constructor |
This file contains hidden or 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
<?php | |
trait FactoryChecking | |
{ | |
protected function checkFactory(string $factoryClass): void | |
{ | |
$trace = debug_backtrace(DEBUG_BACKTRACE_IGNORE_ARGS); | |
foreach($trace as $traceItem) { | |
if ($traceItem['class'] == $factoryClass) { | |
return; |
This file contains hidden or 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
### Keybase proof | |
I hereby claim: | |
* I am mavik on github. | |
* I am mavik (https://keybase.io/mavik) on keybase. | |
* I have a public key ASDX-BNtVNDLkoDJBE-sRVWKcuC2flyLfjwamT2WMPl4jgo | |
To claim this, I am signing this object: |
This file contains hidden or 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
### Keybase proof | |
I hereby claim: | |
* I am marenkov on github. | |
* I am mavik (https://keybase.io/mavik) on keybase. | |
* I have a public key ASBfWOFdpkFEZ8g9Rm8NRu-jbyyV0lfoLV3vYxMJz5_E7Ao | |
To claim this, I am signing this object: |