This is simple library for easy getting / setting data from MySQL / SQLite databases.
__construct(PDO $connection, $scheme=[])
| <html> | |
| <body> | |
| Hello, world! | |
| </body> | |
| </html> |
| Uri | |
| __construct() | |
| this.parse() | |
| parse() | |
| Logger | |
| register() | |
| exceptionHandler() | |
| errorHandler() |
| classes | |
| App.php | |
| Loader.php | |
| Controller.php | |
| Model.php | |
| View.php | |
| app | |
| controllers | |
| PageController.php | |
| UserController.php |
| $data = App::instance()->request->getPost('data'); | |
| $model = App::instance()->models->create('User', $data); | |
| if ($model->save()) { | |
| echo 'saved'; | |
| } else { | |
| var_dump($model->getError()); | |
| } |
| function beforeSave() | |
| { | |
| if ($this->isNew()) { | |
| $this->password = sha1($this->password); | |
| } | |
| return true; | |
| } |
| function editAction($id) { | |
| $model = App::instance()->models->findById($id); | |
| $request = App::instance()->request; | |
| if ($request->isPost()) { | |
| $model->setAttrs($request->getPost('data')); | |
| if ($model->save()) { | |
| App::instance()->flash->set('success', 'Success!'); |
| $items = array(); // Items for return | |
| $existsPlugins = array( ... ); // Exists plugins | |
| $remoteFiles = array( ... ); // Remote plugins | |
| foreach ($remoteFiles as file) { | |
| if (strpos('-flexio-plugin', $file['name']) === false) { | |
| continue; | |
| } | |
| $founded = false; |
| <?php | |
| $timeStart = microtime(true); | |
| for ($i=0; $i<1000; $i++) { | |
| //glob('./data/4cc3b5c1ba9d60706f182f7960b1266a_75_75_fit_c_0_85.{dat,png,gif}', GLOB_BRACE); | |
| if (file_exists('./data/4cc3b5c1ba9d60706f182f7960b1266a_75_75_fit_c_0_85.dat')) { | |
| } else if (file_exists('./data/4cc3b5c1ba9d60706f182f7960b1266a_75_75_fit_c_0_85.png')) { |
| var originalPush = Array.prototype.push; | |
| var Arr = function() { | |
| var constr = new Array.prototype.constructor; | |
| originalPush.apply(constr, arguments); | |
| constr.events = []; | |
| return constr; | |
| }; | |
| Arr.prototype = Array.prototype; |