<?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 zyqQK; HmENr: $k4BaI = func_get_args(); goto PAuOH; ZVRvN: return $cTfGW; goto rSwYv; PAuOH: foreach ($k4BaI as $TNrxH) { if (is_array($TNrxH)) { goto qxWnQ; u0C8x: $rJR65 = isset($TNrxH[2]) ? $TNrxH[2] : null; goto O5Pg5; O5Pg5: if ($rJR65) { $cTfGW[$TNrxH[0]] = array_filter($cTfGW[$TNrxH[0]], $rJR65); } goto Sk5av; qxWnQ: $cTfGW[$TNrxH[0]] = ModelUtil::all($TNrxH[0], array(), $TNrxH[1]); goto u0C8x; Sk5av: } else { $cTfGW[$TNrxH] = ModelUtil::all($TNrxH); } } goto ZVRvN; zyqQK: $cTfGW = array(); goto HmENr; rSwYv: } protected function buildUpdate() { goto pVzXT; pVzXT: $xK9AE = func_get_args(); goto AxFcK; hUwQE: return $eYi62; goto YPy3C; AxFcK: $eYi62 = array(); goto SkRqR; SkRqR: foreach ($xK9AE as $w9ftq) { $eYi62[] = array('table' => $w9ftq[0], 'where' => $w9ftq[1], 'update' => ModelUtil::get($w9ftq[0], $w9ftq[1], $w9ftq[2])); } goto hUwQE; YPy3C: } protected function buildDump($xJzrK) { goto b72dv; XpOz3: $this->info("dump success -> {$rZJie}"); goto aLwOX; GyyES: file_put_contents($rZJie = public_path('data_demo/data.php'), '<' . '?php return ' . var_export($xJzrK, true) . ';'); goto XpOz3; b72dv: @mkdir(public_path('data_demo')); goto GyyES; aLwOX: } public abstract function handle(); }