我有一个类,它包含了Smarty,但我的类使用命名空间test,而Smarty没有使用命名空间。如何在不在smarty文件中写入命名空间的情况下包含Smarty(它有许多系统插件)?
import "smarty/Smarty.php"
class testik
{
public function __construct ()
{
$smarty = new Smarty();
}
}
<?php
class Smarty
{
//somcode
}
Smarty有一个自动加载器类并包含其插件,这些插件也没有命名空间。
\Handy::doGeneralStuff();
。 - jave.web