Permalink
Browse files

Expliciet type meegegeven in de constructor zodat we altijd de juist …

…eobjecten hebben om mee t werken
  • Loading branch information...
1 parent 75983c0 commit b2faf1e9366dbdffcb90ac13959dfa4ee06d892b rota committed Apr 27, 2011
View
@@ -6,7 +6,7 @@ class SpotNzb {
private $_settings;
private $_db;
- function __construct($db, $settings) {
+ function __construct(SpotDb $db, SpotSettings $settings) {
$this->_db = $db;
$this->_settings = $settings;
} # ctor
View
@@ -5,7 +5,7 @@ class SpotPosting {
private $_settings;
private $_nntp_post;
- function __construct($db, $settings) {
+ function __construct(SpotDb $db, SpotSettings $settings) {
$this->_db = $db;
$this->_settings = $settings;
View
@@ -13,7 +13,7 @@ class SpotSettings {
/*
* Instantieert een nieuwe settings klasse
*/
- public static function singleton($db, $settings) {
+ public static function singleton(SpotDb $db, array $settings) {
if (self::$_instance === null) {
self::$_instance = new SpotSettings($db);
@@ -2,7 +2,7 @@
class SpotSettingsUpgrader {
private $_settings;
- function __construct($settings) {
+ function __construct(SpotSettings $settings) {
$this->_settings = $settings;
} # ctor
@@ -91,4 +91,4 @@ function setupNewsgroups() {
$this->setIfNot('comment_group', 'free.usenet');
} # setupNewsgroups()
-} # SpotSettingsUpgrader
+} # SpotSettingsUpgrader
@@ -17,7 +17,7 @@ class SpotTemplateHelper {
static private $_commentCount = null;
- function __construct($settings, $currentSession, $db, $params) {
+ function __construct(SpotSettings $settings, $currentSession, SpotDb $db, $params) {
$this->_settings = $settings;
$this->_currentSession = $currentSession;
$this->_db = $db;
View
@@ -5,7 +5,7 @@ class SpotUserSystem {
private $_db;
private $_settings;
- function __construct($db, $settings) {
+ function __construct(SpotDb $db, SpotSettings $settings) {
$this->_db = $db;
$this->_settings = $settings;
} # ctor
View
@@ -7,7 +7,7 @@ class SpotsOverview {
private $_db;
private $_settings;
- function __construct($db, $settings) {
+ function __construct(SpotDb $db, SpotSettings $settings) {
$this->_db = $db;
$this->_settings = $settings;
} # ctor
@@ -3,7 +3,7 @@
protected $_spotdb;
protected $_dbcon;
- public function __construct($spotdb) {
+ public function __construct(SpotDb $spotdb) {
$this->_spotdb = $spotdb;
$this->_dbcon = $spotdb->getDbHandle();
} # __construct
@@ -5,7 +5,7 @@
protected $_pageTitle;
protected $_currentSession;
- function __construct($db, $settings, $currentSession) {
+ function __construct(SpotDb $db, SpotSettings $settings, $currentSession) {
$this->_db = $db;
$this->_settings = $settings;
$this->_currentSession = $currentSession;
@@ -2,7 +2,7 @@
class SpotPage_atom extends SpotPage_Abs {
private $_params;
- function __construct($db, $settings, $currentSession, $params) {
+ function __construct(SpotDb $db, SpotSettings $settings, $currentSession, $params) {
parent::__construct($db, $settings, $currentSession);
$this->_params = $params;
@@ -2,7 +2,7 @@
class SpotPage_createuser extends SpotPage_Abs {
private $_createUserForm;
- function __construct($db, $settings, $currentSession, $params) {
+ function __construct(SpotDb $db, SpotSettings $settings, $currentSession, $params) {
parent::__construct($db, $settings, $currentSession);
$this->_createUserForm = $params['createuserform'];
} # ctor
@@ -3,7 +3,7 @@ class SpotPage_getimage extends SpotPage_Abs {
private $_messageid;
private $_image;
- function __construct($db, $settings, $currentSession, $params) {
+ function __construct(SpotDb $db, SpotSettings $settings, $currentSession, $params) {
parent::__construct($db, $settings, $currentSession);
$this->_messageid = $params['messageid'];
$this->_image = $params['image'];
@@ -3,7 +3,7 @@ class SpotPage_getnzb extends SpotPage_Abs {
private $_messageid;
private $_action;
- function __construct($db, $settings, $currentSession, $params) {
+ function __construct(SpotDb $db, SpotSettings $settings, $currentSession, $params) {
parent::__construct($db, $settings, $currentSession);
$this->_messageid = $params['messageid'];
$this->_action = $params['action'];
@@ -3,7 +3,7 @@ class SpotPage_getnzbmobile extends SpotPage_Abs {
private $_messageid;
private $_action;
- function __construct($db, $settings, $currentSession, $params) {
+ function __construct(SpotDb $db, SpotSettings $settings, $currentSession, $params) {
parent::__construct($db, $settings, $currentSession);
$this->_messageid = $params['messageid'];
$this->_action = $params['action'];
@@ -2,7 +2,7 @@
class SpotPage_getspot extends SpotPage_Abs {
private $_messageid;
- function __construct($db, $settings, $currentSession, $messageid) {
+ function __construct(SpotDb $db, SpotSettings $settings, $currentSession, $messageid) {
parent::__construct($db, $settings, $currentSession);
$this->_messageid = $messageid;
} # ctor
@@ -2,7 +2,7 @@
class SpotPage_getspotmobile extends SpotPage_Abs {
private $_messageid;
- function __construct($db, $settings, $currentSession, $messageid) {
+ function __construct(SpotDb $db, SpotSettings $settings, $currentSession, $messageid) {
parent::__construct($db, $settings, $currentSession);
$this->_messageid = $messageid;
} # ctor
@@ -2,7 +2,7 @@
class SpotPage_index extends SpotPage_Abs {
private $_params;
- function __construct($db, $settings, $currentSession, $params) {
+ function __construct(SpotDb $db, SpotSettings $settings, $currentSession, $params) {
parent::__construct($db, $settings, $currentSession);
$this->_params = $params;
@@ -2,7 +2,7 @@
class SpotPage_login extends SpotPage_Abs {
private $_loginForm;
- function __construct($db, $settings, $currentSession, $params) {
+ function __construct(SpotDb $db, SpotSettings $settings, $currentSession, $params) {
parent::__construct($db, $settings, $currentSession);
$this->_loginForm = $params['loginform'];
} # ctor
@@ -3,7 +3,7 @@ class SpotPage_postcomment extends SpotPage_Abs {
private $_inReplyTo;
private $_commentForm;
- function __construct($db, $settings, $currentSession, $params) {
+ function __construct(SpotDb $db, SpotSettings $settings, $currentSession, $params) {
parent::__construct($db, $settings, $currentSession);
$this->_commentForm = $params['commentform'];
$this->_inReplyTo = $params['inreplyto'];
@@ -3,7 +3,7 @@ class SpotPage_render extends SpotPage_Abs {
private $_tplname;
private $_params;
- function __construct($db, $settings, $currentSession, $tplName, $params) {
+ function __construct(SpotDb $db, SpotSettings $settings, $currentSession, $tplName, $params) {
parent::__construct($db, $settings, $currentSession);
$this->_tplname = $tplName;
$this->_params = $params;
@@ -2,7 +2,7 @@
class SpotPage_selecttemplate extends SpotPage_Abs {
private $_req;
- function __construct($db, $settings, $currentSession, $req) {
+ function __construct(SpotDb $db, SpotSettings $settings, $currentSession, $req) {
parent::__construct($db, $settings, $currentSession);
$this->_req = $req;
} # ctor
@@ -9,7 +9,7 @@ class SpotPage_statics extends SpotPage_Abs {
private $_params;
private $_currentCssFile;
- function __construct($db, $settings, $currentSession, $params) {
+ function __construct(SpotDb $db, SpotSettings $settings, $currentSession, $params) {
parent::__construct($db, $settings, $currentSession);
$this->_params = $params;
@@ -9,7 +9,7 @@ class SpotRetriever_Comments extends SpotRetriever_Abs {
* db - database object
* rsakeys = array van rsa keys
*/
- function __construct($server, $db, $settings, $outputType) {
+ function __construct($server, SpotDb $db, SpotSettings $settings, $outputType) {
parent::__construct($server, $db, $settings);
$this->_outputType = $outputType;
@@ -11,7 +11,7 @@ class SpotRetriever_Spots extends SpotRetriever_Abs {
* db - database object
* rsakeys = array van rsa keys
*/
- function __construct($server, $db, $settings, $rsakeys, $outputType, $retrieveFull) {
+ function __construct($server, SpotDb $db, SpotSettings $settings, $rsakeys, $outputType, $retrieveFull) {
parent::__construct($server, $db, $settings);
$this->_rsakeys = $rsakeys;

0 comments on commit b2faf1e

Please sign in to comment.