<?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($cgjRu = '') { if (!empty($cgjRu)) { if ($cgjRu instanceof \Closure) { call_user_func($cgjRu, $this); } else { $this->column(12, $cgjRu); } } } public function column($aI0SX, $cgjRu) { goto ZWPoR; wO2Im: $this->addColumn($JJepM); goto Wd3aj; a2wrq: $JJepM = new Column($cgjRu, $aI0SX); goto wO2Im; ZWPoR: $aI0SX = $aI0SX < 1 ? round(12 * $aI0SX) : $aI0SX; goto a2wrq; Wd3aj: } protected function addColumn(Column $JJepM) { $this->columns[] = $JJepM; } public function build() { goto yMOfi; yMOfi: $this->startRow(); goto ZgyqT; ZgyqT: foreach ($this->columns as $JJepM) { $JJepM->build(); } goto rWlVL; rWlVL: $this->endRow(); goto fsM5F; fsM5F: } protected function startRow() { goto q72YY; HobPU: $MsA2r[] = 'row'; goto bK3gK; q72YY: $MsA2r = $this->class; goto HobPU; bK3gK: echo '<div class="' . implode(' ', $MsA2r) . '">'; goto aqozw; aqozw: } protected function endRow() { echo '</div>'; } public function render() { goto zUx1a; Y7QwD: return $R428K; goto k5d1r; zUx1a: ob_start(); goto mTYHO; mTYHO: $this->build(); goto ySZuA; SjfJl: ob_end_clean(); goto Y7QwD; ySZuA: $R428K = ob_get_contents(); goto SjfJl; k5d1r: } }