1
0
Fork 0
mirror of https://github.com/DanielnetoDotCom/YouPHPTube synced 2025-10-04 02:09:22 +02:00

Update comments

This commit is contained in:
Daniel Neto 2024-08-21 09:11:05 -03:00
parent 91ac7ba018
commit d7965a01b8
302 changed files with 56587 additions and 763 deletions

View file

@ -0,0 +1,25 @@
<?php
namespace Safe;
use Safe\Exceptions\ClassobjException;
/**
* Creates an alias named alias
* based on the user defined class class.
* The aliased class is exactly the same as the original class.
*
* @param string $class The original class.
* @param string $alias The alias name for the class.
* @param bool $autoload Whether to autoload if the original class is not found.
* @throws ClassobjException
*
*/
function class_alias(string $class, string $alias, bool $autoload = true): void
{
error_clear_last();
$safeResult = \class_alias($class, $alias, $autoload);
if ($safeResult === false) {
throw ClassobjException::createFromPhpError();
}
}