Merged in parent::__construct() additions from branches/2.3 - r83580 and r83587

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@86676 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
Sean Harvey 2009-09-18 03:02:19 +00:00
parent 2fdb548594
commit b77d088d47
12 changed files with 19 additions and 2 deletions

View File

@ -114,6 +114,8 @@ class RSSFeed extends ViewableData {
$this->lastModified = $lastModified;
$this->etag = $etag;
parent::__construct();
}
/**
@ -245,6 +247,8 @@ class RSSFeed_Entry extends ViewableData {
$this->titleField = $titleField;
$this->descriptionField = $descriptionField;
$this->authorField = $authorField;
parent::__construct();
}
/**

View File

@ -23,6 +23,7 @@ class RestfulService extends ViewableData {
function __construct($base, $expiry=3600){
$this->baseURL = $base;
$this->cache_expire = $expiry;
parent::__construct();
}
/**

View File

@ -14,6 +14,7 @@ class TokenisedRegularExpression extends Object {
function __construct($expression) {
$this->expression = $expression;
parent::__construct();
}
function findAll($tokens) {

View File

@ -25,6 +25,7 @@ class ValidationResult extends Object {
function __construct($valid = true, $message = null) {
$this->isValid = $valid;
if($message) $this->errorList[] = $message;
parent::__construct();
}
/**

View File

@ -45,6 +45,7 @@ class DataDifferencer extends ViewableData {
if(!$toRecord) user_error("DataDifferencer constructed without a toRecord", E_USER_WARNING);
$this->fromRecord = $fromRecord;
$this->toRecord = $toRecord;
parent::__construct();
}
/**

View File

@ -451,6 +451,10 @@ class DataObject extends ViewableData implements DataObjectInterface, i18nEntity
// those objects, which is a better mechanism. Perhaps extensions defined inside the
// class def can somehow be applied at definiton time also?
if($this->extension_instances) foreach($this->extension_instances as $i => $instance) {
if(!$instance->class) {
$class = get_class($instance);
user_error("DataObject::defineMethods(): Please ensure {$class}::__construct() calls parent::__construct()", E_USER_ERROR);
}
DataObjectDecorator::load_extra_statics($this->class, $instance->class);
}

View File

@ -88,6 +88,7 @@ class YamlFixture extends Object {
}
$this->fixtureFile = $fixtureFile;
parent::__construct();
}
/**

View File

@ -45,9 +45,9 @@ class CSSContentParser extends Object {
$tidy = $content;
}
$this->simpleXML = new SimpleXMLElement($tidy);
parent::__construct();
}
/**

View File

@ -76,6 +76,7 @@ class CSVParser extends Object implements Iterator {
$this->filename = $filename;
$this->delimiter = $delimiter;
$this->enclosure = $enclosure;
parent::__construct();
}
/**

View File

@ -117,6 +117,7 @@ class ModelViewer_Model extends ViewableData {
function __construct($className) {
$this->className = $className;
parent::__construct();
}
function getModule() {

View File

@ -149,6 +149,7 @@ class Email extends ViewableData {
if($cc != null) $this->cc = $cc;
if($bcc != null) $this->bcc = $bcc;
if($bounceHandlerURL != null) $this->setBounceHandlerURL($bounceHandlerURL);
parent::__construct();
}
public function attachFileFromString($data, $filename, $mimetype = null) {

View File

@ -53,6 +53,7 @@ class FormScaffolder extends Object {
*/
function __construct($obj) {
$this->obj = $obj;
parent::__construct();
}
/**