<?php
/**
 * ------------------------ 
 *  版权所有  www.tecmz.com
 *  商业版本请购买正版授权使用
 * ------------------------
*/ namespace Module\Vendor\Command; use Illuminate\Console\Command; use ModStart\Core\Dao\ModelUtil; abstract class BaseDumpDemoDataCommand extends Command { protected $signature = 'dump-demo-data'; protected function buildInsert() { goto MCSgF; riMqv: foreach ($U91Q7 as $GocOS) { if (is_array($GocOS)) { goto eRNNo; eRNNo: $vRh0D[$GocOS[0]] = ModelUtil::all($GocOS[0], array(), $GocOS[1]); goto STelc; rJU9A: if ($Mepns) { $vRh0D[$GocOS[0]] = array_filter($vRh0D[$GocOS[0]], $Mepns); } goto G4HCG; STelc: $Mepns = isset($GocOS[2]) ? $GocOS[2] : null; goto rJU9A; G4HCG: } else { $vRh0D[$GocOS] = ModelUtil::all($GocOS); } } goto oJDSX; MCSgF: $vRh0D = array(); goto cg6rY; cg6rY: $U91Q7 = func_get_args(); goto riMqv; oJDSX: return $vRh0D; goto eRBc1; eRBc1: } protected function buildUpdate() { goto HJBje; zbl4z: $M0V00 = array(); goto mkWcr; mkWcr: foreach ($D_6IU as $Cr7ur) { $M0V00[] = array('table' => $Cr7ur[0], 'where' => $Cr7ur[1], 'update' => ModelUtil::get($Cr7ur[0], $Cr7ur[1], $Cr7ur[2])); } goto vGqAE; HJBje: $D_6IU = func_get_args(); goto zbl4z; vGqAE: return $M0V00; goto Zr6Zm; Zr6Zm: } protected function buildDump($U8wjN) { goto oCy9J; gmV1q: $this->info("dump success -> {$dG73t}"); goto nSzAo; yHAyS: file_put_contents($dG73t = public_path('data_demo/data.php'), '<' . '?php return ' . var_export($U8wjN, true) . ';'); goto gmV1q; oCy9J: @mkdir(public_path('data_demo')); goto yHAyS; nSzAo: } public abstract function handle(); }