public function test_tableize() { $this->assert_equal(Inflector::tableize('\\Model\\User'), 'users'); $this->assert_equal(Inflector::tableize('\\Model\\Person'), 'people'); $this->assert_equal(Inflector::tableize('\\Model\\Mouse'), 'mice'); $this->assert_equal(Inflector::tableize('\\Model\\Ox'), 'oxen'); $this->assert_equal(Inflector::tableize('\\Model\\Matrix'), 'matrices'); }
protected function create_model($item_name) { $model_name = 'Model_' . \Fuel\Core\Inflector::words_to_upper($item_name); return new $model_name(); }
<div class="col-lg-12"> <div class="row"> <div class="page-header"> <h3><?php echo \Fuel\Core\Inflector::humanize($folder); ?> </h3> <button class="btn btn-primary" id="up"><i class="fa fa-plus"></i> เพิ่มรูป</button> <hr /> </div> <div class="widget" id="upload"> <?php if (\Fuel\Core\Session::get_flash('error')) { ?> <div class="alert alert-danger"> <?php echo \Fuel\Core\Session::get_flash('error'); ?> </div> <?php } ?> <form class="form form-horizontal" role="form" enctype="multipart/form-data" action="<?php echo \Fuel\Core\Uri::create('filemanager/upload/' . $folder); ?> " method="POST" > <div class="form-group" style="display: none" id="preview"> <label class="control-label col-lg-2">