<?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($xMSF0 = '') { if (!empty($xMSF0)) { if ($xMSF0 instanceof \Closure) { call_user_func($xMSF0, $this); } else { $this->column(12, $xMSF0); } } } public function column($XJUHT, $xMSF0) { goto iHw_4; ELdrr: $this->addColumn($JNXBz); goto t2ohM; nxzBx: $JNXBz = new Column($xMSF0, $XJUHT); goto ELdrr; iHw_4: $XJUHT = $XJUHT < 1 ? round(12 * $XJUHT) : $XJUHT; goto nxzBx; t2ohM: } protected function addColumn(Column $JNXBz) { $this->columns[] = $JNXBz; } public function build() { goto lWm9K; SRUv0: $this->endRow(); goto ddHJF; zEfPK: foreach ($this->columns as $JNXBz) { $JNXBz->build(); } goto SRUv0; lWm9K: $this->startRow(); goto zEfPK; ddHJF: } protected function startRow() { goto ChS7q; krQs6: echo '<div class="' . implode(' ', $StsmC) . '">'; goto mamBe; Bt15q: $StsmC[] = 'row'; goto krQs6; ChS7q: $StsmC = $this->class; goto Bt15q; mamBe: } protected function endRow() { echo '</div>'; } public function render() { goto cjR39; cjR39: ob_start(); goto C3aG0; uj1mZ: return $uWK2G; goto q18qY; xcxcN: $uWK2G = ob_get_contents(); goto u_JWi; C3aG0: $this->build(); goto xcxcN; u_JWi: ob_end_clean(); goto uj1mZ; q18qY: } }