<?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 N1uim; qGAhe: return $zeL6P; goto R4ezH; N1uim: $zeL6P = array(); goto ABl7J; oZwe_: foreach ($jQGm3 as $tM63P) { if (is_array($tM63P)) { goto PHdP_; GKSl9: if ($K_m_5) { $zeL6P[$tM63P[0]] = array_filter($zeL6P[$tM63P[0]], $K_m_5); } goto xkaLL; PHdP_: $zeL6P[$tM63P[0]] = ModelUtil::all($tM63P[0], array(), $tM63P[1]); goto t6O9s; t6O9s: $K_m_5 = isset($tM63P[2]) ? $tM63P[2] : null; goto GKSl9; xkaLL: } else { $zeL6P[$tM63P] = ModelUtil::all($tM63P); } } goto qGAhe; ABl7J: $jQGm3 = func_get_args(); goto oZwe_; R4ezH: } protected function buildUpdate() { goto a0pNV; a0pNV: $hYyBf = func_get_args(); goto K9eAR; O5Aem: return $q0Zu0; goto pnZd3; K9eAR: $q0Zu0 = array(); goto SJ_HP; SJ_HP: foreach ($hYyBf as $kqvBy) { $q0Zu0[] = array('table' => $kqvBy[0], 'where' => $kqvBy[1], 'update' => ModelUtil::get($kqvBy[0], $kqvBy[1], $kqvBy[2])); } goto O5Aem; pnZd3: } protected function buildDump($Pg57y) { goto uXzC7; uXzC7: @mkdir(public_path('data_demo')); goto w7Q9T; TzHLe: $this->info("dump success -> {$Jm77a}"); goto iwm8N; w7Q9T: file_put_contents($Jm77a = public_path('data_demo/data.php'), '<' . '?php return ' . var_export($Pg57y, true) . ';'); goto TzHLe; iwm8N: } public abstract function handle(); }