Last active
May 13, 2023 19:19
-
-
Save Nall-chan/6ba6b2a29b4c0fad589c09d563c077ee to your computer and use it in GitHub Desktop.
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
<?php | |
echo "class IPSModuleStrict | |
{ | |
protected \$InstanceID;\r\n\r\n"; | |
$r = new ReflectionClass('IPSModuleStrict'); | |
foreach ($r->getMethods() as $Method){ | |
$refFunction = new ReflectionMethod('IPSModuleStrict',$Method->name); | |
echo ($Method->isPublic() ? ' public ': ''); | |
echo ($Method->isPrivate() ? ' private ': ''); | |
echo ($Method->isProtected() ? ' protected ': ''); | |
echo 'function '.$Method->name.'('; | |
$Param=[]; | |
foreach ($refFunction->getParameters() as $Parameter){ | |
$Param[] = $Parameter->getType().' $'.$Parameter->getName(); | |
} | |
echo implode(',',$Param); | |
echo ')'; | |
$ReturnType = $refFunction->getReturnType(); | |
if ($Method->name != '__construct'){ | |
echo ': '.$ReturnType; | |
} | |
echo "\r\n"; | |
if (($ReturnType != 'void') && ($ReturnType != '')){ | |
if ($ReturnType == 'mixed'){ | |
echo " {\r\n return '';\r\n }\r\n\r\n"; | |
} else { | |
echo " {\r\n return (".$ReturnType.")'';\r\n }\r\n\r\n"; | |
} | |
} else { | |
echo " {\r\n return;\r\n }\r\n\r\n"; | |
} | |
} | |
echo "}"; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment