Permalink
Browse files

Adding source code folders

  • Loading branch information...
0 parents commit 08a8ea948450632691b9b9a59b8c77ab219e73be Daniel Saidi committed Nov 15, 2010
Showing with 28,644 additions and 0 deletions.
  1. +21 −0 README.TXT
  2. +1 −0 document.php
  3. +13 −0 index_wigbi.php
  4. +96 −0 plugins/data/City.php
  5. +132 −0 plugins/data/Comment.php
  6. +94 −0 plugins/data/Country.php
  7. +88 −0 plugins/data/File.php
  8. +203 −0 plugins/data/Forum.php
  9. +101 −0 plugins/data/ForumPost.php
  10. +171 −0 plugins/data/ForumThread.php
  11. +100 −0 plugins/data/GuestbookEntry.php
  12. +89 −0 plugins/data/HtmlContent.php
  13. +118 −0 plugins/data/ImageFile.php
  14. +89 −0 plugins/data/Location.php
  15. +124 −0 plugins/data/Message.php
  16. +230 −0 plugins/data/Newsletter.php
  17. +82 −0 plugins/data/NewsletterSubscriber.php
  18. +229 −0 plugins/data/Podcast.php
  19. +170 −0 plugins/data/PodcastItem.php
  20. +322 −0 plugins/data/Rating.php
  21. +189 −0 plugins/data/RssFeed.php
  22. +161 −0 plugins/data/RssFeedItem.php
  23. +263 −0 plugins/data/User.php
  24. +75 −0 plugins/ui/HtmlContentControl.js
  25. +132 −0 plugins/ui/HtmlContentControl.php
  26. +87 −0 plugins/ui/HtmlContentForm.js
  27. +117 −0 plugins/ui/HtmlContentForm.php
  28. +96 −0 plugins/ui/LoginForm.js
  29. +117 −0 plugins/ui/LoginForm.php
  30. +62 −0 plugins/ui/LogoutLink.js
  31. +108 −0 plugins/ui/LogoutLink.php
  32. +87 −0 plugins/ui/TinyMceExtender.js
  33. +96 −0 plugins/ui/TinyMceExtender.php
  34. +115 −0 test.php
  35. +94 −0 tests/js/CacheHandlerBehavior.js
  36. +64 −0 tests/js/IniHandlerBehavior.js
  37. +64 −0 tests/js/LanguageHandlerBehavior.js
  38. +118 −0 tests/js/LogHandlerBehavior.js
  39. +131 −0 tests/js/SearchFilterBehavior.js
  40. +104 −0 tests/js/SessionHandlerBehavior.js
  41. +46 −0 tests/js/ValidationHandlerBehavior.js
  42. +95 −0 tests/js/WigbiBehavior.js
  43. +22 −0 tests/js/core/WigbiClassBehavior.js
  44. +584 −0 tests/js/core/WigbiDataPluginBehavior.js
  45. +79 −0 tests/js/core/WigbiUIPluginBehavior.js
  46. +167 −0 tests/php/CacheHandlerBehavior.php
  47. +91 −0 tests/php/ControllerBehavior.php
  48. +194 −0 tests/php/DatabaseHandlerBehavior.php
  49. +105 −0 tests/php/IniHandlerBehavior.php
  50. +40 −0 tests/php/JavaScriptBehavior.php
  51. +66 −0 tests/php/LanguageHandlerBehavior.php
  52. +446 −0 tests/php/LogHandlerBehavior.php
  53. +93 −0 tests/php/MasterPageBehavior.php
  54. +153 −0 tests/php/SearchFilterBehavior.php
  55. +93 −0 tests/php/SessionHandlerBehavior.php
  56. +74 −0 tests/php/UrlHandlerBehavior.php
  57. +63 −0 tests/php/ValidationHandlerBehavior.php
  58. +382 −0 tests/php/ViewBehavior.php
  59. +1,099 −0 tests/php/WigbiBehavior.php
  60. +57 −0 tests/php/core/WigbiDataPluginAjaxFunctionBehavior.php
  61. +1,821 −0 tests/php/core/WigbiDataPluginBehavior.php
  62. +76 −0 tests/php/core/WigbiDataPluginJavaScriptGeneratorBehavior.php
  63. +90 −0 tests/php/core/WigbiDataPluginListBehavior.php
  64. +130 −0 tests/php/core/WigbiUIPluginBehavior.php
  65. +88 −0 tests/plugins/data/CityBehavior.php
  66. +104 −0 tests/plugins/data/CommentBehavior.php
  67. +88 −0 tests/plugins/data/CountryBehavior.php
  68. +84 −0 tests/plugins/data/FileBehavior.php
  69. +192 −0 tests/plugins/data/ForumBehavior.php
  70. +90 −0 tests/plugins/data/ForumPostBehavior.php
  71. +150 −0 tests/plugins/data/ForumThreadBehavior.php
  72. +87 −0 tests/plugins/data/GuestbookEntryBehavior.php
  73. +82 −0 tests/plugins/data/HtmlContentBehavior.php
  74. +103 −0 tests/plugins/data/ImageFileBehavior.php
  75. +82 −0 tests/plugins/data/LocationBehavior.php
  76. +99 −0 tests/plugins/data/MessageBehavior.php
  77. +259 −0 tests/plugins/data/NewsletterBehavior.php
  78. +82 −0 tests/plugins/data/NewsletterSubscriberBehavior.php
  79. +194 −0 tests/plugins/data/PodcastBehavior.php
  80. +139 −0 tests/plugins/data/PodcastItemBehavior.php
  81. +298 −0 tests/plugins/data/RatingBehavior.php
  82. +163 −0 tests/plugins/data/RssFeedBehavior.php
  83. +133 −0 tests/plugins/data/RssFeedItemBehavior.php
  84. +195 −0 tests/plugins/data/UserBehavior.php
  85. +120 −0 tests/qunit/qunit.css
  86. +1,074 −0 tests/qunit/qunit.js
  87. +10 −0 tests/resources/TestDataPlugin.php
  88. +3 −0 tests/resources/TestUiPlugin.js
  89. +10 −0 tests/resources/TestUiPlugin.php
  90. +42 −0 tests/resources/config.ini
  91. +42 −0 tests/resources/config_cssPaths.ini
  92. 0 tests/resources/config_invalid.ini
  93. +39 −0 tests/resources/config_invalidDbCredentials.ini
  94. +42 −0 tests/resources/config_invalidDbCredentialsNoRtb.ini
  95. +42 −0 tests/resources/config_invalidLanguageFile.ini
  96. +28 −0 tests/resources/config_minimal.ini
  97. +4 −0 tests/resources/config_noName.ini
  98. +42 −0 tests/resources/config_noObfuscate.ini
  99. +42 −0 tests/resources/config_noRtb.ini
  100. +4 −0 tests/resources/config_noWebRoot.ini
  101. +8 −0 tests/resources/config_nosections.ini
  102. +11 −0 tests/resources/english.ini
  103. +5 −0 tests/resources/master.php
  104. +1 −0 tests/resources/view.php
  105. +98 −0 tests/resources/wigbiDataPlugin_expected.js
  106. +13 −0 wigbi/.htaccess
  107. +42 −0 wigbi/config.ini
  108. +42 −0 wigbi/config_default.ini
  109. +1 −0 wigbi/css/general.css
  110. +27 −0 wigbi/css/ui.css
  111. +674 −0 wigbi/gpl.txt
  112. +154 −0 wigbi/js/jquery-1.4.2.min.js
  113. +482 −0 wigbi/js/json.js
  114. +77 −0 wigbi/js/wigbi/CacheHandler.js
  115. +67 −0 wigbi/js/wigbi/IniHandler.js
  116. +59 −0 wigbi/js/wigbi/LanguageHandler.js
  117. +186 −0 wigbi/js/wigbi/LogHandler.js
  118. +133 −0 wigbi/js/wigbi/SearchFilter.js
  119. +76 −0 wigbi/js/wigbi/SessionHandler.js
  120. +53 −0 wigbi/js/wigbi/ValidationHandler.js
  121. +133 −0 wigbi/js/wigbi/Wigbi.js
  122. +42 −0 wigbi/js/wigbi/core/WigbiClass.js
  123. +222 −0 wigbi/js/wigbi/core/WigbiDataPlugin.js
  124. +85 −0 wigbi/js/wigbi/core/WigbiUIPlugin.js
  125. +9 −0 wigbi/js/wigbi_dataPlugins.js
  126. +9 −0 wigbi/js/wigbi_uiPlugins.js
  127. +3 −0 wigbi/lang/english.ini
  128. +24 −0 wigbi/lang/swedish.ini
  129. +234 −0 wigbi/pages/bundle.php
  130. +13 −0 wigbi/pages/postBack.php
  131. +209 −0 wigbi/php/wigbi/CacheHandler.php
  132. +104 −0 wigbi/php/wigbi/Controller.php
  133. +256 −0 wigbi/php/wigbi/DatabaseHandler.php
  134. +138 −0 wigbi/php/wigbi/IniHandler.php
  135. +77 −0 wigbi/php/wigbi/JavaScript.php
  136. +112 −0 wigbi/php/wigbi/LanguageHandler.php
  137. +310 −0 wigbi/php/wigbi/LogHandler.php
  138. +170 −0 wigbi/php/wigbi/MasterPage.php
  139. +259 −0 wigbi/php/wigbi/SearchFilter.php
  140. +132 −0 wigbi/php/wigbi/SessionHandler.php
  141. +120 −0 wigbi/php/wigbi/UrlHandler.php
  142. +105 −0 wigbi/php/wigbi/ValidationHandler.php
  143. +265 −0 wigbi/php/wigbi/View.php
  144. +1,097 −0 wigbi/php/wigbi/Wigbi.php
  145. +1,325 −0 wigbi/php/wigbi/core/WigbiDataPlugin.php
  146. +104 −0 wigbi/php/wigbi/core/WigbiDataPluginAjaxFunction.php
  147. +167 −0 wigbi/php/wigbi/core/WigbiDataPluginJavaScriptGenerator.php
  148. +189 −0 wigbi/php/wigbi/core/WigbiDataPluginList.php
  149. +190 −0 wigbi/php/wigbi/core/WigbiUIPlugin.php
  150. +741 −0 wigbi/php/wigbi/tools/JavaScriptPacker.php
  151. +851 −0 wigbi/php/wigbi/tools/Log.php
  152. +231 −0 wigbi/php/wigbi/tools/log/composite.php
  153. +208 −0 wigbi/php/wigbi/tools/log/console.php
  154. +235 −0 wigbi/php/wigbi/tools/log/daemon.php
  155. +159 −0 wigbi/php/wigbi/tools/log/display.php
  156. +127 −0 wigbi/php/wigbi/tools/log/error_log.php
  157. +316 −0 wigbi/php/wigbi/tools/log/file.php
  158. +214 −0 wigbi/php/wigbi/tools/log/firebug.php
  159. +257 −0 wigbi/php/wigbi/tools/log/mail.php
  160. +170 −0 wigbi/php/wigbi/tools/log/mcal.php
  161. +358 −0 wigbi/php/wigbi/tools/log/mdb2.php
  162. +91 −0 wigbi/php/wigbi/tools/log/null.php
  163. +129 −0 wigbi/php/wigbi/tools/log/observer.php
  164. +294 −0 wigbi/php/wigbi/tools/log/sql.php
  165. +225 −0 wigbi/php/wigbi/tools/log/sqlite.php
  166. +179 −0 wigbi/php/wigbi/tools/log/syslog.php
  167. +270 −0 wigbi/php/wigbi/tools/log/win.php
  168. +183 −0 wigbi/release-notes.txt
  169. +19 −0 wigbi/wigbi.php
@@ -0,0 +1,21 @@
+Wigbi
+=====
+
+Author: Daniel Saidi [daniel.saidi@gmail.com]
+
+Wigbi is a minimalistic PHP/JavaScript application framework
+that features a lot of easy-to use, straightforward features
+out of the box.
+
+This repository contains:
+
+ * wigbi/ - The latest version with all source code and all you need to use Wigbi
+ * plugins/ - All available Wigbi plugins, both data and UI
+ * tests/ - Folder with unit tests and test resources
+ *
+ * index_wigbi.php - A simple index page that verifies that Wigbi works
+ * test.php - A page that runs all Wigbi unit tests
+
+Until Wigbi 1 is released, you are more than welcome to grab
+the source code and have a look at it...and to use the Wigbi
+build as you see fit.
@@ -0,0 +1 @@
+<?php header("Location: tools/PhpDocumentor/index.html"); ?>
@@ -0,0 +1,13 @@
+<?php include "wigbi/wigbi.php"; ?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd" >
+
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en" >
+ <head>
+ <?php Wigbi::start(); ?>
+ </head>
+
+ <body>
+ <h1>Hello world!</h1>
+ </body>
+</html>
+
+<?php Wigbi::stop(); ?>
@@ -0,0 +1,96 @@
+<?php
+/**
+ * Wigbi.Plugins.Data.City class file.
+ *
+ * Wigbi is free software. You can redistribute it and/or modify it
+ * under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * Wigbi is distributed in the hope that it will be useful, but WITH
+ * NO WARRANTY; without even the implied warranty of MERCHANTABILITY
+ * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public
+ * License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with Wigbi. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+/**
+ * The Wigbi.Plugins.Data.City class.
+ *
+ * This class represents a city, with a name and a lat/long position.
+ *
+ * The countryId property can also be used as an object reference to
+ * provide fully traceable cities.
+ *
+ *
+ * @author Daniel Saidi <daniel.saidi@gmail.com>
+ * @copyright Copyright © 2010, Daniel Saidi
+ * @link http://www.wigbi.com
+ * @package Wigbi
+ * @subpackage Plugins.Data
+ * @version 1.0.0
+ */
+
+class City extends WigbiDataPlugin
+{
+ /**#@+
+ * @ignore
+ */
+ public $_name = "__50";
+ public $_latitude = 0.0;
+ public $_longitude = 0.0;
+ public $_countryId = "__GUID";
+ /**#@-*/
+
+
+ public function __construct()
+ {
+ parent::__construct();
+ }
+
+
+ public function countryId($value = "")
+ {
+ if (func_num_args() != 0)
+ $this->_countryId = func_get_arg(0);
+ return $this->_countryId;
+ }
+
+ public function latitude($value = 0.0)
+ {
+ if (func_num_args() != 0)
+ $this->_latitude = func_get_arg(0);
+ return $this->_latitude;
+ }
+
+ public function longitude($value = 0.0)
+ {
+ if (func_num_args() != 0)
+ $this->_longitude = func_get_arg(0);
+ return $this->_longitude;
+ }
+
+ public function name($value = "")
+ {
+ if (func_num_args() != 0)
+ $this->_name = func_get_arg(0);
+ return $this->_name;
+ }
+
+
+ public function validate()
+ {
+ //Init error list
+ $errorList = array();
+
+ //Require that a name is defined
+ if (!trim($this->name()))
+ array_push($errorList, "nameRequired");
+
+ //Return error list
+ return $errorList;
+ }
+}
+?>
@@ -0,0 +1,132 @@
+<?php
+/**
+ * Wigbi.Plugins.Data.Comment class file.
+ *
+ * Wigbi is free software. You can redistribute it and/or modify it
+ * under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * Wigbi is distributed in the hope that it will be useful, but WITH
+ * NO WARRANTY; without even the implied warranty of MERCHANTABILITY
+ * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public
+ * License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with Wigbi. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+/**
+ * The Wigbi.Plugins.Data.Comment class.
+ *
+ * This class represents a general comment that can be applied to an
+ * object of any kind, even "non-existing", non-stored objects.
+ *
+ * If the commented object is not stored in a database and therefore
+ * has no ID, the ownerId property can be used as a unique name. For
+ * instance, when a class is commented on the Wigbi demo site, a new
+ * comment is created with ownerId set to the name of the class.
+ *
+ * The easiest way to connect a comment to another Wigbi data plugin
+ * class is to add a synced data list to the data plugin and add the
+ * comment to that list. This makes sure that the comment is deleted
+ * together with the object to which it belongs.
+ *
+ * The senderId and receiverId properties can also be used as object
+ * reference to provide fully traceable comments.
+ *
+ *
+ * @author Daniel Saidi <daniel.saidi@gmail.com>
+ * @copyright Copyright © 2010, Daniel Saidi
+ * @link http://www.wigbi.com
+ * @package Wigbi
+ * @subpackage Plugins.Data
+ * @version 1.0.0
+ */
+class Comment extends WigbiDataPlugin
+{
+ /**#@+
+ * @ignore
+ */
+ public $_authorName = "__50";
+ public $_authorEmail = "__50";
+ public $_authorUrl = "__50";
+ public $_senderId = "__GUID";
+ public $_receiverId = "__GUID";
+ public $_createdDateTime = "__DATETIME";
+ public $_text = "__TEXT";
+ /**#@-*/
+
+
+ public function __construct()
+ {
+ parent::__construct();
+ }
+
+
+ public function authorEmail($value = "")
+ {
+ if (func_num_args() != 0)
+ $this->_authorEmail = func_get_arg(0);
+ return $this->_authorEmail;
+ }
+
+ public function authorName($value = "")
+ {
+ if (func_num_args() != 0)
+ $this->_authorName = func_get_arg(0);
+ return $this->_authorName;
+ }
+
+ public function authorUrl($value = "")
+ {
+ if (func_num_args() != 0)
+ $this->_authorUrl = func_get_arg(0);
+ return $this->_authorUrl;
+ }
+
+ public function createdDateTime()
+ {
+ return $this->_createdDateTime;
+ }
+
+ public function receiverId($value = "")
+ {
+ if (func_num_args() != 0)
+ $this->_receiverId = func_get_arg(0);
+ return $this->_receiverId;
+ }
+
+ public function senderId($value = "")
+ {
+ if (func_num_args() != 0)
+ $this->_senderId = func_get_arg(0);
+ return $this->_senderId;
+ }
+
+ public function text($value = "")
+ {
+ if (func_num_args() != 0)
+ $this->_text = func_get_arg(0);
+ return $this->_text;
+ }
+
+
+ public function validate()
+ {
+ //Init error list
+ $errorList = array();
+
+ //Require a valid e-mail address if one is defined
+ if ($this->authorEmail() && !ValidationHandler::isEmail($this->authorEmail()))
+ array_push($errorList, "emailInvalid");
+
+ //Require that a text is defined
+ if (!trim($this->text()))
+ array_push($errorList, "textRequired");
+
+ //Return error list
+ return $errorList;
+ }
+}
+?>
@@ -0,0 +1,94 @@
+<?php
+/**
+ * Wigbi.Plugins.Data.Country class file.
+ *
+ * Wigbi is free software. You can redistribute it and/or modify it
+ * under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * Wigbi is distributed in the hope that it will be useful, but WITH
+ * NO WARRANTY; without even the implied warranty of MERCHANTABILITY
+ * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public
+ * License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with Wigbi. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+/**
+ * The Wigbi.Plugins.Data.Country class.
+ *
+ * This class represents a country, with a name, a language code and
+ * a lat/long position. The class also has a city data list to which
+ * City instances can be added.
+ *
+ *
+ * @author Daniel Saidi <daniel.saidi@gmail.com>
+ * @copyright Copyright © 2010, Daniel Saidi
+ * @link http://www.wigbi.com
+ * @package Wigbi
+ * @subpackage Plugins.Data
+ * @version 1.0.0
+ */
+class Country extends WigbiDataPlugin
+{
+ /**#@+
+ * @ignore
+ */
+ public $_name = "__50";
+ public $_latitude = 0.0;
+ public $_longitude = 0.0;
+ public $_languageCode = "__10";
+ /**#@-*/
+
+
+ public function __construct()
+ {
+ parent::__construct();
+ }
+
+
+ public function languageCode($value = "")
+ {
+ if (func_num_args() != 0)
+ $this->_languageCode = func_get_arg(0);
+ return $this->_languageCode;
+ }
+
+ public function latitude($value = 0.0)
+ {
+ if (func_num_args() != 0)
+ $this->_latitude = func_get_arg(0);
+ return $this->_latitude;
+ }
+
+ public function longitude($value = 0.0)
+ {
+ if (func_num_args() != 0)
+ $this->_longitude = func_get_arg(0);
+ return $this->_longitude;
+ }
+
+ public function name($value = "")
+ {
+ if (func_num_args() != 0)
+ $this->_name = func_get_arg(0);
+ return $this->_name;
+ }
+
+
+ public function validate()
+ {
+ //Init error list
+ $errorList = array();
+
+ //Require that a name is defined
+ if (!trim($this->name()))
+ array_push($errorList, "nameRequired");
+
+ //Return error list
+ return $errorList;
+ }
+}
+?>
Oops, something went wrong.

0 comments on commit 08a8ea9

Please sign in to comment.