Added more PHPDoc stuff

This commit is contained in:
flash 2016-02-03 23:22:56 +01:00
parent ff025f978c
commit 38ddeb2a52
38 changed files with 241 additions and 5 deletions

View file

@ -1,4 +1,10 @@
<?php <?php
/**
* Holds the action code handling class.
*
* @package Sakura
*/
namespace Sakura; namespace Sakura;
/** /**

View file

@ -1,4 +1,10 @@
<?php <?php
/**
* Holds the BBcode handler.
*
* @package Sakura
*/
namespace Sakura; namespace Sakura;
use JBBCode\Parser; use JBBCode\Parser;

View file

@ -1,4 +1,10 @@
<?php <?php
/**
* Holds the text alignment bbcode class.
*
* @package Sakura
*/
namespace Sakura\BBcodeDefinitions; namespace Sakura\BBcodeDefinitions;
use JBBCode\Parser; use JBBCode\Parser;

View file

@ -1,4 +1,10 @@
<?php <?php
/**
* Holds the code format bbcode class.
*
* @package Sakura
*/
namespace Sakura\BBcodeDefinitions; namespace Sakura\BBcodeDefinitions;
use JBBCode\Parser; use JBBCode\Parser;

View file

@ -1,4 +1,10 @@
<?php <?php
/**
* Holds the list bbcode class.
*
* @package Sakura
*/
namespace Sakura\BBcodeDefinitions; namespace Sakura\BBcodeDefinitions;
use JBBCode\Parser; use JBBCode\Parser;

View file

@ -1,4 +1,10 @@
<?php <?php
/**
* Holds the font size bbcode class.
*
* @package Sakura
*/
namespace Sakura\BBcodeDefinitions; namespace Sakura\BBcodeDefinitions;
use JBBCode\Parser; use JBBCode\Parser;

View file

@ -1,6 +1,8 @@
<?php <?php
/* /**
* User bbcode * Holds the username linking bbcode class.
*
* @package Sakura
*/ */
namespace Sakura\BBcodeDefinitions; namespace Sakura\BBcodeDefinitions;
@ -9,8 +11,17 @@ use JBBCode\Parser;
use JBBCode\CodeDefinition; use JBBCode\CodeDefinition;
use JBBCode\ElementNode; use JBBCode\ElementNode;
/**
* Username BBcode for JBBCode.
*
* @package Sakura
* @author Julian van de Groep <me@flash.moe>
*/
class User extends CodeDefinition class User extends CodeDefinition
{ {
/**
* Constructor.
*/
public function __construct() public function __construct()
{ {
parent::__construct(); parent::__construct();
@ -19,6 +30,13 @@ class User extends CodeDefinition
$this->setParseContent(false); $this->setParseContent(false);
} }
/**
* Compiles the user bbcode to HTML
*
* @param ElementNode $el The JBBCode element node.
*
* @return string The compiled HTML.
*/
public function asHtml(ElementNode $el) public function asHtml(ElementNode $el)
{ {
$content = ""; $content = "";

View file

@ -1,4 +1,10 @@
<?php <?php
/**
* Holds the YouTube embed bbcode class.
*
* @package Sakura
*/
namespace Sakura\BBcodeDefinitions; namespace Sakura\BBcodeDefinitions;
use JBBCode\Parser; use JBBCode\Parser;

View file

@ -1,4 +1,10 @@
<?php <?php
/**
* Holds the ban manager.
*
* @package Sakura
*/
namespace Sakura; namespace Sakura;
/** /**

View file

@ -1,4 +1,10 @@
<?php <?php
/**
* Holds the CSRF token handler.
*
* @package Sakura
*/
namespace Sakura; namespace Sakura;
use Sakura\Hashing; use Sakura\Hashing;

View file

@ -1,4 +1,10 @@
<?php <?php
/**
* Holds the holds the comment handler class.
*
* @package Sakura
*/
namespace Sakura; namespace Sakura;
/** /**

View file

@ -1,4 +1,10 @@
<?php <?php
/**
* Holds the configuration manager.
*
* @package Sakura
*/
namespace Sakura; namespace Sakura;
/** /**

View file

@ -1,4 +1,10 @@
<?php <?php
/**
* Holds the console application meta.
*
* @package Sakura
*/
namespace Sakura\Console; namespace Sakura\Console;
/** /**

View file

@ -1,4 +1,10 @@
<?php <?php
/**
* Holds the forum pages controllers.
*
* @package Sakura
*/
namespace Sakura\Controllers; namespace Sakura\Controllers;
use Sakura\Config; use Sakura\Config;

View file

@ -1,4 +1,10 @@
<?php <?php
/**
* Holds the meta page controllers.
*
* @package Sakura
*/
namespace Sakura\Controllers; namespace Sakura\Controllers;
use Sakura\Config; use Sakura\Config;

View file

@ -1,4 +1,10 @@
<?php <?php
/**
* Holds the MySQL/PDO wrapper.
*
* @package Sakura
*/
namespace Sakura\DBWrapper; namespace Sakura\DBWrapper;
use PDO; use PDO;

View file

@ -1,4 +1,10 @@
<?php <?php
/**
* Holds the database wrapper interfacer.
*
* @package Sakura
*/
namespace Sakura; namespace Sakura;
/** /**

View file

@ -1,4 +1,10 @@
<?php <?php
/**
* Holds the file server.
*
* @package Sakura
*/
namespace Sakura; namespace Sakura;
use finfo; use finfo;

View file

@ -1,4 +1,10 @@
<?php <?php
/**
* Holds the forum object class.
*
* @package Sakura
*/
namespace Sakura\Forum; namespace Sakura\Forum;
use Sakura\Database; use Sakura\Database;
@ -157,7 +163,11 @@ class Forum
return $raw ? $perm : $this->_permissions->check($flag, $perm); return $raw ? $perm : $this->_permissions->check($flag, $perm);
} }
// Subforums /**
* Gets all subforums of this forum.
*
* @return array Array containing forum objects.
*/
public function forums() public function forums()
{ {
// Check if _forums is populated // Check if _forums is populated

View file

@ -1,4 +1,10 @@
<?php <?php
/**
* Holds the post object class.
*
* @package Sakura
*/
namespace Sakura\Forum; namespace Sakura\Forum;
use Sakura\Utils; use Sakura\Utils;

View file

@ -1,4 +1,10 @@
<?php <?php
/**
* Holds the thread object class.
*
* @package Sakura
*/
namespace Sakura\Forum; namespace Sakura\Forum;
use Sakura\Database; use Sakura\Database;

View file

@ -1,5 +1,5 @@
<?php <?php
/* /**
* Password Hashing With PBKDF2 (https://defuse.ca/php-pbkdf2.htm). * Password Hashing With PBKDF2 (https://defuse.ca/php-pbkdf2.htm).
* Copyright (c) 2013, Taylor Hornby * Copyright (c) 2013, Taylor Hornby
* All rights reserved. * All rights reserved.
@ -25,6 +25,8 @@
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE. * POSSIBILITY OF SUCH DAMAGE.
*
* @package Sakura
*/ */
namespace Sakura; namespace Sakura;

View file

@ -1,4 +1,10 @@
<?php <?php
/**
* Holds the news handler.
*
* @package Sakura
*/
namespace Sakura; namespace Sakura;
/** /**

View file

@ -1,4 +1,10 @@
<?php <?php
/**
* Holds the payments handler.
*
* @package Sakura
*/
namespace Sakura; namespace Sakura;
use \PayPal\Api\Amount; use \PayPal\Api\Amount;

View file

@ -1,4 +1,10 @@
<?php <?php
/**
* Holds the global permissions handler.
*
* @package Sakura
*/
namespace Sakura; namespace Sakura;
/** /**

View file

@ -1,4 +1,10 @@
<?php <?php
/**
* Holds the forum permission flags.
*
* @package Sakura
*/
namespace Sakura\Perms; namespace Sakura\Perms;
/** /**

View file

@ -1,4 +1,10 @@
<?php <?php
/**
* Holds the site management permission flags.
*
* @package Sakura
*/
namespace Sakura\Perms; namespace Sakura\Perms;
/** /**

View file

@ -1,4 +1,10 @@
<?php <?php
/**
* Holds the global site permission flags.
*
* @package Sakura
*/
namespace Sakura\Perms; namespace Sakura\Perms;
/** /**

View file

@ -1,4 +1,10 @@
<?php <?php
/**
* Holds the rank object class.
*
* @package Sakura
*/
namespace Sakura; namespace Sakura;
use Sakura\Perms; use Sakura\Perms;

View file

@ -1,4 +1,10 @@
<?php <?php
/**
* Holds the router class.
*
* @package Sakura
*/
namespace Sakura; namespace Sakura;
use Phroute\Phroute\RouteCollector; use Phroute\Phroute\RouteCollector;

View file

@ -1,4 +1,10 @@
<?php <?php
/**
* Holds the session handler.
*
* @package Sakura
*/
namespace Sakura; namespace Sakura;
/** /**

View file

@ -1,4 +1,10 @@
<?php <?php
/**
* Holds the templating engine class.
*
* @package Sakura
*/
namespace Sakura; namespace Sakura;
use Twig_Environment; use Twig_Environment;

View file

@ -1,4 +1,10 @@
<?php <?php
/**
* Holds the extension manager.
*
* @package Sakura
*/
namespace Sakura; namespace Sakura;
/** /**

View file

@ -1,4 +1,10 @@
<?php <?php
/**
* Holds the url generation class.
*
* @package Sakura
*/
namespace Sakura; namespace Sakura;
/** /**

View file

@ -1,4 +1,10 @@
<?php <?php
/**
* Holds the user object class.
*
* @package Sakura
*/
namespace Sakura; namespace Sakura;
use Sakura\Perms; use Sakura\Perms;

View file

@ -1,4 +1,10 @@
<?php <?php
/**
* Holds various functions to interface with users.
*
* @package Sakura
*/
namespace Sakura; namespace Sakura;
use Sakura\Perms\Site; use Sakura\Perms\Site;

View file

@ -1,4 +1,10 @@
<?php <?php
/**
* Holds various utility functions.
*
* @package Sakura
*/
namespace Sakura; namespace Sakura;
use PHPMailer; use PHPMailer;

View file

@ -1,5 +1,5 @@
<?php <?php
/* /**
* Whois in PHP (featuring a very original name), adjusted for Sakura * Whois in PHP (featuring a very original name), adjusted for Sakura
* By Flashwave <http://flash.moe> * By Flashwave <http://flash.moe>
* Released under the MIT-License * Released under the MIT-License
@ -25,6 +25,8 @@
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE. * SOFTWARE.
*
* @package Sakura
*/ */
namespace Sakura; namespace Sakura;