<?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($rFmqf = '') { if (!empty($rFmqf)) { if ($rFmqf instanceof \Closure) { call_user_func($rFmqf, $this); } else { $this->column(12, $rFmqf); } } } public function column($mRq_j, $rFmqf) { goto ybjvB; Eullz: $gnky8 = new Column($rFmqf, $mRq_j); goto UGGn2; UGGn2: $this->addColumn($gnky8); goto n4wwX; ybjvB: $mRq_j = $mRq_j < 1 ? round(12 * $mRq_j) : $mRq_j; goto Eullz; n4wwX: } protected function addColumn(Column $gnky8) { $this->columns[] = $gnky8; } public function build() { goto STgcG; x4kLF: foreach ($this->columns as $gnky8) { $gnky8->build(); } goto J916L; STgcG: $this->startRow(); goto x4kLF; J916L: $this->endRow(); goto olCIG; olCIG: } protected function startRow() { goto ncayn; r0S0J: $KrsM3[] = 'row'; goto K_2Fe; K_2Fe: echo '<div class="' . implode(' ', $KrsM3) . '">'; goto ineao; ncayn: $KrsM3 = $this->class; goto r0S0J; ineao: } protected function endRow() { echo '</div>'; } public function render() { goto b2Fat; ATbCd: $bUmyU = ob_get_contents(); goto KvikF; nYLI3: return $bUmyU; goto glvw3; bNUFG: $this->build(); goto ATbCd; b2Fat: ob_start(); goto bNUFG; KvikF: ob_end_clean(); goto nYLI3; glvw3: } }