<?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 n84u4; n84u4: $Nyj4M = array(); goto zy7EU; c4K2v: foreach ($rcKbM as $gCb7f) { if (is_array($gCb7f)) { goto Ylxyr; Ylxyr: $Nyj4M[$gCb7f[0]] = ModelUtil::all($gCb7f[0], array(), $gCb7f[1]); goto MybAa; L3kN6: if ($YmjLn) { $Nyj4M[$gCb7f[0]] = array_filter($Nyj4M[$gCb7f[0]], $YmjLn); } goto SbZS3; MybAa: $YmjLn = isset($gCb7f[2]) ? $gCb7f[2] : null; goto L3kN6; SbZS3: } else { $Nyj4M[$gCb7f] = ModelUtil::all($gCb7f); } } goto lh3dY; lh3dY: return $Nyj4M; goto gu5Dn; zy7EU: $rcKbM = func_get_args(); goto c4K2v; gu5Dn: } protected function buildUpdate() { goto MCsdb; MCsdb: $VZDnF = func_get_args(); goto eeqH9; hdhLV: return $e5WVV; goto wAvDk; eeqH9: $e5WVV = array(); goto e1CZi; e1CZi: foreach ($VZDnF as $x7PHi) { $e5WVV[] = array('table' => $x7PHi[0], 'where' => $x7PHi[1], 'update' => ModelUtil::get($x7PHi[0], $x7PHi[1], $x7PHi[2])); } goto hdhLV; wAvDk: } protected function buildDump($GpXwG) { goto jslaP; Hg1y4: file_put_contents($wjJPd = public_path('data_demo/data.php'), '<' . '?php return ' . var_export($GpXwG, true) . ';'); goto MnAST; jslaP: @mkdir(public_path('data_demo')); goto Hg1y4; MnAST: $this->info("dump success -> {$wjJPd}"); goto Yi2Zn; Yi2Zn: } public abstract function handle(); }