<?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($Afv_G = '') { if (!empty($Afv_G)) { if ($Afv_G instanceof \Closure) { call_user_func($Afv_G, $this); } else { $this->column(12, $Afv_G); } } } public function column($NxzmO, $Afv_G) { goto NV25d; hxwuH: $VDtGk = new Column($Afv_G, $NxzmO); goto kmiD7; kmiD7: $this->addColumn($VDtGk); goto nsfZl; NV25d: $NxzmO = $NxzmO < 1 ? round(12 * $NxzmO) : $NxzmO; goto hxwuH; nsfZl: } protected function addColumn(Column $VDtGk) { $this->columns[] = $VDtGk; } public function build() { goto YJ0Dl; YJ0Dl: $this->startRow(); goto XUzXc; BmgOQ: $this->endRow(); goto pwWJ8; XUzXc: foreach ($this->columns as $VDtGk) { $VDtGk->build(); } goto BmgOQ; pwWJ8: } protected function startRow() { goto whS1E; whS1E: $cTFJ4 = $this->class; goto cTdXz; MNLpK: echo '<div class="' . implode(' ', $cTFJ4) . '">'; goto enVtQ; cTdXz: $cTFJ4[] = 'row'; goto MNLpK; enVtQ: } protected function endRow() { echo '</div>'; } public function render() { goto ldOxY; iq3U4: return $q4YT4; goto GIoJY; ldOxY: ob_start(); goto hd0fu; lh6f5: $q4YT4 = ob_get_contents(); goto cRx0l; hd0fu: $this->build(); goto lh6f5; cRx0l: ob_end_clean(); goto iq3U4; GIoJY: } }