<?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 KFcK0; VnU3W: $LesCl = func_get_args(); goto RAOXs; RAOXs: foreach ($LesCl as $hTN3M) { if (is_array($hTN3M)) { goto WrOyV; WrOyV: $GT5iX[$hTN3M[0]] = ModelUtil::all($hTN3M[0], array(), $hTN3M[1]); goto HSNfb; EPkja: if ($IyVBr) { $GT5iX[$hTN3M[0]] = array_filter($GT5iX[$hTN3M[0]], $IyVBr); } goto uEJDa; HSNfb: $IyVBr = isset($hTN3M[2]) ? $hTN3M[2] : null; goto EPkja; uEJDa: } else { $GT5iX[$hTN3M] = ModelUtil::all($hTN3M); } } goto V_vL0; KFcK0: $GT5iX = array(); goto VnU3W; V_vL0: return $GT5iX; goto azQpA; azQpA: } protected function buildUpdate() { goto TQdNX; yX1Ou: return $Wjsh1; goto ADDga; TQdNX: $L5KhH = func_get_args(); goto K8aFS; K8aFS: $Wjsh1 = array(); goto xxtuG; xxtuG: foreach ($L5KhH as $d_GvY) { $Wjsh1[] = array('table' => $d_GvY[0], 'where' => $d_GvY[1], 'update' => ModelUtil::get($d_GvY[0], $d_GvY[1], $d_GvY[2])); } goto yX1Ou; ADDga: } protected function buildDump($cwaKT) { goto Oi3_c; gySWP: $this->info("dump success -> {$okURS}"); goto ae2l9; Oi3_c: @mkdir(public_path('data_demo')); goto o5P2H; o5P2H: file_put_contents($okURS = public_path('data_demo/data.php'), '<' . '?php return ' . var_export($cwaKT, true) . ';'); goto gySWP; ae2l9: } public abstract function handle(); }