Introduce PSR-4 autoloading

This commit is contained in:
Sobak
2016-07-21 17:09:48 +02:00
parent 62dafbe8dd
commit 54f96b9938
48 changed files with 342 additions and 238 deletions

View File

@@ -10,12 +10,19 @@
* @version 0.22
*/
namespace PrivateBin\model;
use Exception;
use PrivateBin\privatebin;
use PrivateBin\serversalt;
use PrivateBin\sjcl;
/**
* model_paste
*
* Model of a PrivateBin paste.
*/
class model_paste extends model_abstract
class paste extends AbstractModel
{
/**
* Get paste data.
@@ -130,7 +137,7 @@ class model_paste extends model_abstract
{
throw new Exception('Invalid data.', 62);
}
$comment = new model_comment($this->_conf, $this->_store);
$comment = new comment($this->_conf, $this->_store);
$comment->setPaste($this);
$comment->setParentId($parentId);
if ($commentId !== null) $comment->setId($commentId);