<?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($vVYCS = '') { if (!empty($vVYCS)) { if ($vVYCS instanceof \Closure) { call_user_func($vVYCS, $this); } else { $this->column(12, $vVYCS); } } } public function column($pbpff, $vVYCS) { goto QmSrZ; QmSrZ: $pbpff = $pbpff < 1 ? round(12 * $pbpff) : $pbpff; goto q2qc6; q2qc6: $t_tdX = new Column($vVYCS, $pbpff); goto NEQmA; NEQmA: $this->addColumn($t_tdX); goto Nthmc; Nthmc: } protected function addColumn(Column $t_tdX) { $this->columns[] = $t_tdX; } public function build() { goto cjGAq; lPybV: foreach ($this->columns as $t_tdX) { $t_tdX->build(); } goto Qo7Oc; cjGAq: $this->startRow(); goto lPybV; Qo7Oc: $this->endRow(); goto iVLq7; iVLq7: } protected function startRow() { goto D1ucS; zJL63: echo '<div class="' . implode(' ', $ogfq7) . '">'; goto bLu5O; lGu1v: $ogfq7[] = 'row'; goto zJL63; D1ucS: $ogfq7 = $this->class; goto lGu1v; bLu5O: } protected function endRow() { echo '</div>'; } public function render() { goto ctcOT; ctcOT: ob_start(); goto cEL7l; LGrvR: ob_end_clean(); goto wgnfk; cEL7l: $this->build(); goto Gb0UT; Gb0UT: $zg3kc = ob_get_contents(); goto LGrvR; wgnfk: return $zg3kc; goto HQFKb; HQFKb: } }