mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
Partial revert of #7665 - overzealous string renames
This commit is contained in:
parent
85e97d204b
commit
4ca385e033
@ -158,7 +158,7 @@ abstract class SS_Object {
|
||||
// Singleton to create should be the calling class if not Object,
|
||||
// otherwise the first parameter
|
||||
$class = get_called_class();
|
||||
if($class === 'SS_Object') $class = array_shift($args);
|
||||
if($class == 'SS_Object' || $class == 'Object') $class = array_shift($args);
|
||||
|
||||
return Injector::inst()->get($class);
|
||||
}
|
||||
@ -653,7 +653,7 @@ abstract class SS_Object {
|
||||
|
||||
// --------------------------------------------------------------------------------------------------------------
|
||||
|
||||
private static $unextendable_classes = array('SS_Object', 'ViewableData', 'RequestHandler');
|
||||
private static $unextendable_classes = array('SS_Object', 'Object', 'ViewableData', 'RequestHandler');
|
||||
|
||||
static public function get_extra_config_sources($class = null) {
|
||||
if($class === null) $class = get_called_class();
|
||||
|
@ -91,7 +91,7 @@ class SS_ConfigStaticManifest {
|
||||
protected $statics;
|
||||
|
||||
static protected $initial_classes = array(
|
||||
'SS_Object', 'ViewableData', 'Injector', 'Director'
|
||||
'SS_Object', 'Object', 'ViewableData', 'Injector', 'Director'
|
||||
);
|
||||
|
||||
/**
|
||||
|
@ -192,7 +192,7 @@ class MySQLiConnector extends DBConnector {
|
||||
case 'double':
|
||||
$types .= 'd';
|
||||
break;
|
||||
case 'SS_Object': // Allowed if the object or resource has a __toString method
|
||||
case 'object': // Allowed if the object or resource has a __toString method
|
||||
case 'resource':
|
||||
case 'string':
|
||||
case 'NULL': // Take care that a where clause should use "where XX is null" not "where XX = null"
|
||||
|
@ -286,7 +286,7 @@ class PDOConnector extends DBConnector {
|
||||
return PDO::PARAM_NULL;
|
||||
case 'integer':
|
||||
return PDO::PARAM_INT;
|
||||
case 'SS_Object': // Allowed if the object or resource has a __toString method
|
||||
case 'object': // Allowed if the object or resource has a __toString method
|
||||
case 'resource':
|
||||
case 'float': // Not actually returnable from get_type
|
||||
case 'double':
|
||||
|
Loading…
Reference in New Issue
Block a user