Thread: Errata
View Single Post
 
Old March 1st, 2005, 03:00 PM
omarosa omarosa is offline
Registered User
 
Join Date: Feb 2005
Location: , , .
Posts: 7
Thanks: 0
Thanked 0 Times in 0 Posts
Default Errata

I'm going to keep an updated list of errors I run into, so I (and other people) have an easy place to reference to. Unlike the actual errata page, this will contain something. I haven't read the book straight through, nor have I tested everything, so anyone else feel free to add anything.



[u]06.25.2005 </u>
Chapter 11 - class.LoggerBackend.php & class.fileLoggerBackend.php

It will complain because class.fileLoggerBackend.php's implementation of the logMessage() is not done in the same way as in class.LoggerBackend.php (the class it extends). You can simply change one method to match the other.

original:

class.fileLoggerBackend.php:
Code:
public function logMessage($msg, $logLevel = LOGGER_INFO, $module = null)
class.LoggerBackend.php:
Code:
abstract function logMessage($message, $logLevel = LOGGER_INFO, $module)
corrected:

class.fileLoggerBackend.php:
Code:
public function logMessage($msg, $logLevel = LOGGER_INFO, $module = null)
class.LoggerBackend.php:
Code:
abstract function logMessage($message, $logLevel = LOGGER_INFO, $module = null)
Chapter 11 - newclass.Logger.php

Code:
private static function manageBackends($name, LoggerBackend $objBack = null)
can be changed to the following:
Code:
private static function manageBackends($name, $objBack = null)
It will complain about the argument not being of the right type.


Chapter 5 - class.Collection.php

Fatal error: Call to private method NightClub::_loadSingers() from context 'Collection' in d:\web\book\ch05\class.Collection.php on line 91

To fix this, change the _loadSingers function from private to public in the NightClub class (ie public function _loadSingers(Collection $col))

Correction from eggspencer


[u]03.01.2005 </u>
Chapter 13 - constraint.phpm
original:
Code:
function GetConstraintType() {
    return($this->_intContraintType);
}
corrected:
Code:
function GetConstraintType() {
    return($this->_intConstraintType);
}
Chapter 13 - request.phpm
original:
Code:
function GetPostVariables() {
    return($this->_arPostVariables);
}
function GetGetVariables() {
    return($this->_arGetVariables);
}
corrected:
Code:
function GetPostVariables() {
    return($this->_arPostVars);
}
function GetGetVariables() {
    return($this->_arGetVars);
}