<?php
/**
 * ------------------------ 
 *  版权所有  www.tecmz.com
 *  商业版本请购买正版授权使用
 * ------------------------
*/ namespace ModStart\Layout; use Illuminate\Contracts\Support\Renderable; class Row implements Buildable, Renderable { protected $columns = array(); protected $class = array(); public function __construct($gP2DQ = '') { if (!empty($gP2DQ)) { if ($gP2DQ instanceof \Closure) { call_user_func($gP2DQ, $this); } else { $this->column(12, $gP2DQ); } } } public function column($g_1Yr, $gP2DQ) { goto EVzky; MPbZ2: $this->addColumn($GR5Ef); goto ZREol; iiRMg: $GR5Ef = new Column($gP2DQ, $g_1Yr); goto MPbZ2; EVzky: $g_1Yr = $g_1Yr < 1 ? round(12 * $g_1Yr) : $g_1Yr; goto iiRMg; ZREol: } protected function addColumn(Column $GR5Ef) { $this->columns[] = $GR5Ef; } public function build() { goto PZ4gj; PZ4gj: $this->startRow(); goto A7jIP; bkjYf: $this->endRow(); goto MS_4d; A7jIP: foreach ($this->columns as $GR5Ef) { $GR5Ef->build(); } goto bkjYf; MS_4d: } protected function startRow() { goto ABQAZ; CUtuH: echo '<div class="' . implode(' ', $t7pan) . '">'; goto nC6b7; kVhXH: $t7pan[] = 'row'; goto CUtuH; ABQAZ: $t7pan = $this->class; goto kVhXH; nC6b7: } protected function endRow() { echo '</div>'; } public function render() { goto FeHe6; h4uGt: $this->build(); goto dneoE; bWTZO: ob_end_clean(); goto oHjtj; dneoE: $jMvVI = ob_get_contents(); goto bWTZO; oHjtj: return $jMvVI; goto nvMU9; FeHe6: ob_start(); goto h4uGt; nvMU9: } }