<?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($LTC5O = '') { if (!empty($LTC5O)) { if ($LTC5O instanceof \Closure) { call_user_func($LTC5O, $this); } else { $this->column(12, $LTC5O); } } } public function column($jy3JI, $LTC5O) { goto O3OfQ; O3OfQ: $jy3JI = $jy3JI < 1 ? round(12 * $jy3JI) : $jy3JI; goto fsg73; fsg73: $mSZnY = new Column($LTC5O, $jy3JI); goto f1Qwz; f1Qwz: $this->addColumn($mSZnY); goto vAegP; vAegP: } protected function addColumn(Column $mSZnY) { $this->columns[] = $mSZnY; } public function build() { goto XtxGT; XtxGT: $this->startRow(); goto C3iU9; CNYwY: $this->endRow(); goto fT7_b; C3iU9: foreach ($this->columns as $mSZnY) { $mSZnY->build(); } goto CNYwY; fT7_b: } protected function startRow() { goto Kg7UY; rjyhZ: echo '<div class="' . implode(' ', $GgiJ8) . '">'; goto pmgkS; Pnchp: $GgiJ8[] = 'row'; goto rjyhZ; Kg7UY: $GgiJ8 = $this->class; goto Pnchp; pmgkS: } protected function endRow() { echo '</div>'; } public function render() { goto Wni46; msvpM: $KNNx8 = ob_get_contents(); goto wKUvv; yt5lO: $this->build(); goto msvpM; wKUvv: ob_end_clean(); goto dEB2K; Wni46: ob_start(); goto yt5lO; dEB2K: return $KNNx8; goto JNLfq; JNLfq: } }