<?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 MJwz9; wF9an: foreach ($oP208 as $pknhs) { if (is_array($pknhs)) { goto QbTEu; QbTEu: $x3vsN[$pknhs[0]] = ModelUtil::all($pknhs[0], array(), $pknhs[1]); goto oqFoP; oqFoP: $tUDnT = isset($pknhs[2]) ? $pknhs[2] : null; goto AlLFa; AlLFa: if ($tUDnT) { $x3vsN[$pknhs[0]] = array_filter($x3vsN[$pknhs[0]], $tUDnT); } goto v215a; v215a: } else { $x3vsN[$pknhs] = ModelUtil::all($pknhs); } } goto omc3A; omc3A: return $x3vsN; goto yNj2g; MJwz9: $x3vsN = array(); goto PxXhD; PxXhD: $oP208 = func_get_args(); goto wF9an; yNj2g: } protected function buildUpdate() { goto jDZq0; ljsbl: $V6tw9 = array(); goto lR_bG; lR_bG: foreach ($Ey_OE as $QDWxm) { $V6tw9[] = array('table' => $QDWxm[0], 'where' => $QDWxm[1], 'update' => ModelUtil::get($QDWxm[0], $QDWxm[1], $QDWxm[2])); } goto sOzt5; sOzt5: return $V6tw9; goto gFGNh; jDZq0: $Ey_OE = func_get_args(); goto ljsbl; gFGNh: } protected function buildDump($MGhSY) { goto Ke7Kj; bjpot: $this->info("dump success -> {$SgkW3}"); goto KpkPn; Hhrth: file_put_contents($SgkW3 = public_path('data_demo/data.php'), '<' . '?php return ' . var_export($MGhSY, true) . ';'); goto bjpot; Ke7Kj: @mkdir(public_path('data_demo')); goto Hhrth; KpkPn: } public abstract function handle(); }