<?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 UYn0J; jnlL0: foreach ($f3ucU as $fnOXp) { if (is_array($fnOXp)) { goto ReY38; NX3bu: if ($S9xWV) { $r6zEm[$fnOXp[0]] = array_filter($r6zEm[$fnOXp[0]], $S9xWV); } goto FoZGt; ReY38: $r6zEm[$fnOXp[0]] = ModelUtil::all($fnOXp[0], array(), $fnOXp[1]); goto b3eEV; b3eEV: $S9xWV = isset($fnOXp[2]) ? $fnOXp[2] : null; goto NX3bu; FoZGt: } else { $r6zEm[$fnOXp] = ModelUtil::all($fnOXp); } } goto T_OVe; T_OVe: return $r6zEm; goto zKiCZ; imXi7: $f3ucU = func_get_args(); goto jnlL0; UYn0J: $r6zEm = array(); goto imXi7; zKiCZ: } protected function buildUpdate() { goto pJgDD; j4UIZ: foreach ($Z207Z as $OeU8w) { $Jn7VK[] = array('table' => $OeU8w[0], 'where' => $OeU8w[1], 'update' => ModelUtil::get($OeU8w[0], $OeU8w[1], $OeU8w[2])); } goto neIQZ; pJgDD: $Z207Z = func_get_args(); goto ScGKt; neIQZ: return $Jn7VK; goto vF0vP; ScGKt: $Jn7VK = array(); goto j4UIZ; vF0vP: } protected function buildDump($I3SIX) { goto I8Xi2; pgFd0: $this->info("dump success -> {$SEC4E}"); goto J9214; I8Xi2: @mkdir(public_path('data_demo')); goto Ho4gN; Ho4gN: file_put_contents($SEC4E = public_path('data_demo/data.php'), '<' . '?php return ' . var_export($I3SIX, true) . ';'); goto pgFd0; J9214: } public abstract function handle(); }