From e6657a95cdad86c8d2cad0f959bb86ed91a8e31c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B8rn=20=C3=85ne?= Date: Mon, 15 Aug 2016 18:47:07 +0200 Subject: [PATCH 1/2] Add boilerplate and initial activity classes. --- src/_autoload.php | 39 ++++++++++++++++++++++++++++++ src/pvv/side/activity.php | 14 +++++++++++ src/pvv/side/event.php | 10 ++++++++ src/pvv/side/repeatingactivity.php | 12 +++++++++ 4 files changed, 75 insertions(+) create mode 100644 src/_autoload.php create mode 100644 src/pvv/side/activity.php create mode 100644 src/pvv/side/event.php create mode 100644 src/pvv/side/repeatingactivity.php diff --git a/src/_autoload.php b/src/_autoload.php new file mode 100644 index 0000000..c8a7111 --- /dev/null +++ b/src/_autoload.php @@ -0,0 +1,39 @@ + + * + * Permission to use, copy, modify, and/or distribute this software for any + * purpose with or without fee is hereby granted, provided that the above + * copyright notice and this permission notice appear in all copies. + * + * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES + * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR + * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES + * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN + * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF + * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + */ +/** + * Register SPL autoloading for classes and interfaces. Put this file in your + * namespace root and make sure it gets included from your PHP entry-point. + * + * There is no requirement for capitalisation for your namespaces and classes, + * but all folders and files MUST be lower-case. Class names are automatically + * lower-cased on autoload. This conforms to the PHP design philosophy that + * functions and class names must be case-insensitive. + * + * The include path is changed to prefer the current directory over the + * established include path. This is because manual include/require statements + * will likely not be used, because it will be handled by autoloading. + * Feel free to change this behaviour if that works better for you. + * + * @author Jørn Åne de Jong <@jornane> + * @copyright Copyright (c) 2014-2015, Jørn Åne de Jong <@jornane> + * @link https://gist.github.com/jornane/667f2e3acc262ce6bf44 + * @link http://php.net/manual/en/function.spl-autoload.php + * @license http://choosealicense.com/licenses/isc/ ISC license + */ +spl_autoload_extensions( '.php' ); +spl_autoload_register( 'spl_autoload' ); +set_include_path( realpath( __DIR__ ) . PATH_SEPARATOR . get_include_path() ); diff --git a/src/pvv/side/activity.php b/src/pvv/side/activity.php new file mode 100644 index 0000000..8d81dcc --- /dev/null +++ b/src/pvv/side/activity.php @@ -0,0 +1,14 @@ + Date: Mon, 15 Aug 2016 18:48:02 +0200 Subject: [PATCH 2/2] Add boilerplate and initial interfaces. --- src/pvv/side/activity.php | 2 +- src/pvv/side/event.php | 2 +- src/pvv/side/repeatingactivity.php | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/pvv/side/activity.php b/src/pvv/side/activity.php index 8d81dcc..6799d4f 100644 --- a/src/pvv/side/activity.php +++ b/src/pvv/side/activity.php @@ -1,4 +1,4 @@ -