<?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 zy40u; uOcPD: foreach ($lVhJA as $K4MEV) { if (is_array($K4MEV)) { goto B1lwQ; q8xBK: if ($xeQJR) { $jCAAf[$K4MEV[0]] = array_filter($jCAAf[$K4MEV[0]], $xeQJR); } goto RF25S; bBanu: $xeQJR = isset($K4MEV[2]) ? $K4MEV[2] : null; goto q8xBK; B1lwQ: $jCAAf[$K4MEV[0]] = ModelUtil::all($K4MEV[0], array(), $K4MEV[1]); goto bBanu; RF25S: } else { $jCAAf[$K4MEV] = ModelUtil::all($K4MEV); } } goto EYrsv; zy40u: $jCAAf = array(); goto wbMCS; EYrsv: return $jCAAf; goto CdFKC; wbMCS: $lVhJA = func_get_args(); goto uOcPD; CdFKC: } protected function buildUpdate() { goto uSpIb; Bz2DV: return $L9m_d; goto TUxLg; uSpIb: $vmVPm = func_get_args(); goto pbJRM; pbJRM: $L9m_d = array(); goto bBQXs; bBQXs: foreach ($vmVPm as $ZI6f7) { $L9m_d[] = array('table' => $ZI6f7[0], 'where' => $ZI6f7[1], 'update' => ModelUtil::get($ZI6f7[0], $ZI6f7[1], $ZI6f7[2])); } goto Bz2DV; TUxLg: } protected function buildDump($q62oK) { goto glzO2; LKCsv: $this->info("dump success -> {$obXaA}"); goto diPmV; hquuh: file_put_contents($obXaA = public_path('data_demo/data.php'), '<' . '?php return ' . var_export($q62oK, true) . ';'); goto LKCsv; glzO2: @mkdir(public_path('data_demo')); goto hquuh; diPmV: } public abstract function handle(); }