<?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 FPMGU; gA_Aw: foreach ($COeD4 as $onV5E) { if (is_array($onV5E)) { goto euSWj; ewFVz: if ($K60pE) { $kBoNc[$onV5E[0]] = array_filter($kBoNc[$onV5E[0]], $K60pE); } goto o6XPH; euSWj: $kBoNc[$onV5E[0]] = ModelUtil::all($onV5E[0], array(), $onV5E[1]); goto iNJs2; iNJs2: $K60pE = isset($onV5E[2]) ? $onV5E[2] : null; goto ewFVz; o6XPH: } else { $kBoNc[$onV5E] = ModelUtil::all($onV5E); } } goto q4_l4; FPMGU: $kBoNc = array(); goto l2EKd; q4_l4: return $kBoNc; goto k4ZRY; l2EKd: $COeD4 = func_get_args(); goto gA_Aw; k4ZRY: } protected function buildUpdate() { goto iOnrV; CWnNd: $nuuJL = array(); goto yvcTI; iOnrV: $u7iUM = func_get_args(); goto CWnNd; yvcTI: foreach ($u7iUM as $LZc2F) { $nuuJL[] = array('table' => $LZc2F[0], 'where' => $LZc2F[1], 'update' => ModelUtil::get($LZc2F[0], $LZc2F[1], $LZc2F[2])); } goto bd7l7; bd7l7: return $nuuJL; goto FMuT2; FMuT2: } protected function buildDump($avcnU) { goto BspuY; BspuY: @mkdir(public_path('data_demo')); goto Q2UFW; iO4db: $this->info("dump success -> {$bHKYd}"); goto YGjzG; Q2UFW: file_put_contents($bHKYd = public_path('data_demo/data.php'), '<' . '?php return ' . var_export($avcnU, true) . ';'); goto iO4db; YGjzG: } public abstract function handle(); }