Ejemplo n.º 1
0
 /**
  * @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);
 }
Ejemplo n.º 2
0
 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;
 }
Ejemplo n.º 3
0
<?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'])) {