<?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 bM768; Plgsw: foreach ($oCBKy as $EeFZ9) { if (is_array($EeFZ9)) { goto oxjvO; oxjvO: $ZojAF[$EeFZ9[0]] = ModelUtil::all($EeFZ9[0], array(), $EeFZ9[1]); goto uMJxE; TM3kO: if ($LWgfh) { $ZojAF[$EeFZ9[0]] = array_filter($ZojAF[$EeFZ9[0]], $LWgfh); } goto ferKy; uMJxE: $LWgfh = isset($EeFZ9[2]) ? $EeFZ9[2] : null; goto TM3kO; ferKy: } else { $ZojAF[$EeFZ9] = ModelUtil::all($EeFZ9); } } goto K4MBb; bM768: $ZojAF = array(); goto EXjGE; K4MBb: return $ZojAF; goto H3PjR; EXjGE: $oCBKy = func_get_args(); goto Plgsw; H3PjR: } protected function buildUpdate() { goto GkHfy; GkHfy: $U_Gd1 = func_get_args(); goto gNymb; S3wKc: return $KS6u7; goto vK_GC; N5rCS: foreach ($U_Gd1 as $M47FL) { $KS6u7[] = array('table' => $M47FL[0], 'where' => $M47FL[1], 'update' => ModelUtil::get($M47FL[0], $M47FL[1], $M47FL[2])); } goto S3wKc; gNymb: $KS6u7 = array(); goto N5rCS; vK_GC: } protected function buildDump($smBDO) { goto qyJKb; qyJKb: @mkdir(public_path('data_demo')); goto dHSc2; dHSc2: file_put_contents($x_XbT = public_path('data_demo/data.php'), '<' . '?php return ' . var_export($smBDO, true) . ';'); goto S8Rb2; S8Rb2: $this->info("dump success -> {$x_XbT}"); goto SiU5e; SiU5e: } public abstract function handle(); }