本文整理汇总了PHP中PHPParser::SafeLoadPHPFile方法的典型用法代码示例。如果您正苦于以下问题:PHP PHPParser::SafeLoadPHPFile方法的具体用法?PHP PHPParser::SafeLoadPHPFile怎么用?PHP PHPParser::SafeLoadPHPFile使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类PHPParser
的用法示例。
在下文中一共展示了PHPParser::SafeLoadPHPFile方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: __construct
<?php
if (!class_exists('RESTObserver')) {
PHPParser::SafeLoadPHPFile('events/includes/class.RESTObserver.php');
}
class RESTInvoiceObserver extends RESTObserver implements IInvoiceObserver, IConfigurable
{
public function __construct(DataForm $Config)
{
$this->Config = $Config;
}
public static function GetConfigurationForm()
{
$ConfigurationForm = new DataForm();
$ConfigurationForm->SetInlineHelp("");
$methods = get_class_methods(__CLASS__);
foreach ($methods as $method) {
if ($method != '__construct' && $method != 'GetConfigurationForm') {
$ConfigurationForm->AppendField(new DataFormField("{$method}URL", FORM_FIELD_TYPE::TEXT, "{$method} URL"));
}
}
return $ConfigurationForm;
}
public function OnIssued(Invoice $Invoice)
{
$this->Request('OnIssued', array('Invoice' => $Invoice->ToArray()));
}
public function OnPaid(Invoice $Invoice, AbstractPaymentModule $payment_module = null)
{
$module_name = $payment_module !== null ? $payment_module->GetModuleName() : "Manual";
$this->Request('OnPaid', array('Invoice' => $Invoice->ToArray(), 'payment_module' => $module_name));
示例2: IncludePHPFile
function IncludePHPFile($params, &$smarty)
{
PHPParser::SafeLoadPHPFile($params['path']);
}