mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
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:
parent
2fdb548594
commit
b77d088d47
@ -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();
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -23,6 +23,7 @@ class RestfulService extends ViewableData {
|
||||
function __construct($base, $expiry=3600){
|
||||
$this->baseURL = $base;
|
||||
$this->cache_expire = $expiry;
|
||||
parent::__construct();
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -14,6 +14,7 @@ class TokenisedRegularExpression extends Object {
|
||||
|
||||
function __construct($expression) {
|
||||
$this->expression = $expression;
|
||||
parent::__construct();
|
||||
}
|
||||
|
||||
function findAll($tokens) {
|
||||
|
@ -25,6 +25,7 @@ class ValidationResult extends Object {
|
||||
function __construct($valid = true, $message = null) {
|
||||
$this->isValid = $valid;
|
||||
if($message) $this->errorList[] = $message;
|
||||
parent::__construct();
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -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();
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -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);
|
||||
}
|
||||
|
||||
|
@ -88,6 +88,7 @@ class YamlFixture extends Object {
|
||||
}
|
||||
|
||||
$this->fixtureFile = $fixtureFile;
|
||||
parent::__construct();
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -45,9 +45,9 @@ class CSSContentParser extends Object {
|
||||
$tidy = $content;
|
||||
}
|
||||
|
||||
|
||||
|
||||
$this->simpleXML = new SimpleXMLElement($tidy);
|
||||
|
||||
parent::__construct();
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -76,6 +76,7 @@ class CSVParser extends Object implements Iterator {
|
||||
$this->filename = $filename;
|
||||
$this->delimiter = $delimiter;
|
||||
$this->enclosure = $enclosure;
|
||||
parent::__construct();
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -117,6 +117,7 @@ class ModelViewer_Model extends ViewableData {
|
||||
|
||||
function __construct($className) {
|
||||
$this->className = $className;
|
||||
parent::__construct();
|
||||
}
|
||||
|
||||
function getModule() {
|
||||
|
@ -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) {
|
||||
|
@ -53,6 +53,7 @@ class FormScaffolder extends Object {
|
||||
*/
|
||||
function __construct($obj) {
|
||||
$this->obj = $obj;
|
||||
parent::__construct();
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
Reference in New Issue
Block a user