Note: the $data object in ApiView is Registry not Data object, we must use set() to set data.
Component is com_flower, view is sakuras.
// components/com_flower/view/sakuras/json.php| <?php | |
| ini_set('display_errors', true); error_reporting(-1); // <- for debugging purposes only | |
| $socket=socket_create(AF_INET, SOCK_RAW, SOL_TCP); | |
| if ( !$socket ) { | |
| $errno = socket_last_error(); | |
| $error = sprintf('%s (%d)', socket_strerror($errno), $errno); | |
| trigger_error($error, E_USER_ERROR); | |
| } |
| <?php | |
| include("./php-AES.php"); | |
| $z = "abcdefgh01234567"; // 128-bit key | |
| //$z = "abcdefghijkl012345678901"; // 192-bit key | |
| //$z = "abcdefghijuklmno0123456789012345"; // 256-bit key | |
| $aes = new AES($z); | |
| $data = file_get_contents("./example.txt"); |
| <?php | |
| // components/com_flower/model/sakura.php | |
| // Model | |
| class FlowerModelSakura extends \Windwalker\Model\CrudModel | |
| { | |
| // CrudModel will auto getForm() | |
| } | |
| // Then add components/com_flower/model/form/sakura.xml |
| /* | |
| * Easing Functions - inspired from http://gizma.com/easing/ | |
| * only considering the t value for the range [0, 1] => [0, 1] | |
| */ | |
| EasingFunctions = { | |
| // no easing, no acceleration | |
| linear: function (t) { return t }, | |
| // accelerating from zero velocity | |
| easeInQuad: function (t) { return t*t }, | |
| // decelerating to zero velocity |
| /** | |
| * http://applemusic.tumblr.com/ | |
| * https://jsfiddle.net/xq56dmrh/ | |
| */ | |
| /** Ultra Light */ | |
| @font-face { | |
| font-family: "San Francisco"; | |
| font-weight: 100; | |
| src: url("https://applesocial.s3.amazonaws.com/assets/styles/fonts/sanfrancisco/sanfranciscodisplay-ultralight-webfont.woff"); |
| <?php | |
| define('OAUTH2_CLIENT_ID', ''); | |
| define('OAUTH2_CLIENT_SECRET', ''); | |
| $authorizeURL = 'https://github.com/login/oauth/authorize'; | |
| $tokenURL = 'https://github.com/login/oauth/access_token'; | |
| $apiURLBase = 'https://api.github.com/'; | |
| session_start(); |
| ffmpeg -i /path/to/video.mp4 -ss 00:00:5 -vframes 1 -y /path/to/preview.png |
| <?php | |
| /** | |
| * Part of Ezset project. | |
| * | |
| * @copyright Copyright (C) 2015 {ORGANIZATION}. All rights reserved. | |
| * @license GNU General Public License version 2 or later; | |
| */ | |
| namespace MyEzset\Listener\ModuleRedirect; |