This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /users (get/post) # lists the users / adds a new user | |
| /login (get/post) | |
| /logout (get/post) | |
| /{id} (get/patch/delete) # show the profile, update the user, delete the user | |
| /activity (get) # show the activity for a user | |
| /notifications (get) # gets the notifications for this user | |
| /topics (get/post) # list all of the recent topics, add a new topic | |
| /{id} (get/patch/delete) # show a topic / update a topic / delete a topic | |
| /resources (get) # get the resources (attachments) associated with the topic |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| // @todo implement ArrayAccess and Traversable? | |
| class OnlineLog | |
| { | |
| /** | |
| * How often, in seconds, to run the database garbage collection | |
| */ | |
| const DB_GC_TIME = 30; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| /** | |
| * Every method is chainable | |
| * Instead of throwing errors, it throws exceptions | |
| * All exceptions should show the name of the method throwing it to make it easier to debug | |
| * | |
| * @todo throw exceptions if argument is not the appropriate type | |
| */ | |
| class ArrayChainable extends \ArrayObject |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| class Event | |
| { | |
| protected $name; | |
| protected $parameters = array(); | |
| /** @var EventDispatcher **/ | |
| protected $dispatcher; | |
| /** @var Pimple dependency injection container */ | |
| protected $container; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| /** | |
| * This file has all the main functions in it that relate to the mysql database. | |
| * | |
| * @name ElkArte Forum | |
| * @copyright ElkArte Forum contributors | |
| * @license BSD http://opensource.org/licenses/BSD-3-Clause | |
| * | |
| * This file contains code covered by: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Portable DateTime and Schedule Notation | |
| There are two types of PDTSN objects: iterator and check | |
| The iterator allows you to iterate the date and time from start to end | |
| The check checks the conditions against the supplied value | |
| Both objects have an object for a date clause and a time clause. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // This checks for US President's elections | |
| // With a hypothetical reporting of election results every other hour between 8 AM and 8 PM | |
| {'check': { | |
| 'value': 'now', | |
| 'date': [ | |
| {'year': {$gt: 1775}}, | |
| {'year': 'leapyear'}, | |
| {'month': 'november'}, | |
| {'dayofweek': 'tuesday'}, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| /* | |
| CREATE TABLE {$db_prefix}plugin_hooks ( | |
| id_hook smallint(6) unsigned NOT NULL auto_increment, | |
| id_plugin smallint(6) unsigned NOT NULL, | |
| event varchar(100) NOT NULL, | |
| class varchar(100) NOT NULL DEFAULT '', | |
| method varchar(255) NOT NULL, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| class admin_info_files | |
| { | |
| protected $id_file; | |
| protected $filename; | |
| protected $path; | |
| protected $parameters; | |
| protected $data; | |
| protected $filetype; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| function adjustBoardCounts(array $boards) | |
| { | |
| $db = database(); | |
| foreach ($boards as $id_board => $stats) | |
| { | |
| if (function_exists('apache_reset_timeout')) | |
| @apache_reset_timeout(); |