static function upload($fileName, $destination) { if (isset($_FILES[$fileName])) { folder::create(dirname($destination)); if (move_uploaded_file($_FILES[$fileName]['tmp_name'], $destination)) { PHPToolkit::getClass('FileInterface'); return new FileInterface($destination); } } return false; }
public function form($action = '', $method = 'post', $enctType = '') { PHPToolkit::getClass('formInterface'); $form = new formInterface(clone $this->fieldSet, $action, $method, $enctType); $form->clearValues(); //TODO: find why values are left behind from previous operations (passed by reference). return $form; }
static function loadValidator() { return PHPToolkit::loadCSS('form/validate.css') . PHPToolkit::loadJavascript('jquery/jquery.js') . PHPToolkit::loadJavascript('form/validate.js'); }
public function filter($where = NULL, $order = NULL, $limit = NULL, $override = false) { PHPToolkit::getClass('filter'); $this->filter = new filter($where, $order, $limit, $override); }