本文整理汇总了PHP中Parser::getInstance方法的典型用法代码示例。如果您正苦于以下问题:PHP Parser::getInstance方法的具体用法?PHP Parser::getInstance怎么用?PHP Parser::getInstance使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Parser
的用法示例。
在下文中一共展示了Parser::getInstance方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: laravel_model_to_database_entries
/**
* @param mixed $class Laravel Model name usually taken by using the ::class static property
*/
public static function laravel_model_to_database_entries($class)
{
$parser = Parser::getInstance();
$autoDBSection = $parser->getAutoDBSection($class);
$parserResults = $parser->makeAssemblyInstructionsFromString(substr($class, strrpos($class, '\\') + 1), $autoDBSection);
$modelAssembler = new LaravelModelAssembler();
$modelAssembler->assemble($parserResults);
}
示例2: mapping
public function mapping($donator)
{
if (!empty($donator) && (is_object($donator) || is_array($donator))) {
$this->_donator = $donator;
$this->_properties = Parser::getInstance()->parse($this);
$this->onBeforeMapping();
foreach ($this->_properties as $property) {
$property->mapping($this, $this->_donator);
}
$this->onAfterMapping();
unset($this->_donator);
unset($this->_properties);
}
return $this;
}
示例3:
<?php
$data_parse = Parser::getInstance()->init();
//value="<?=Parser::getInstance()->getFileName();
?>
<div class="col-md-15 well">
<form enctype="multipart/form-data" method="post">
<div class ="form-group">
<input type="file" class="filestyle" data-icon="false" name="<?php
echo Parser::GET_FILE;
?>
">
</div>
<input type ="submit" class="btn btn-primary" value='Загрузить'>
</form>
<script type="text/javascript" src="/assets/lib/bootstrap-filestyle-1.2.1/src/bootstrap-filestyle.min.js"></script>
<script>
$(":file").filestyle('buttonText', "Выбрать файл");
</script>
<?php
if ($data_parse == 1) {
?>
<br><div class="alert alert-dismissible alert-danger">
Данный тип файла не поддерживается
</div>
<?php
}
if (isset($_REQUEST['success'])) {