Partial revert of #7665 - overzealous string renames

This commit is contained in:
Daniel Hensby 2018-02-09 19:27:45 +00:00
parent 85e97d204b
commit 4ca385e033
No known key found for this signature in database
GPG Key ID: B00D1E9767F0B06E
4 changed files with 5 additions and 5 deletions

View File

@ -158,7 +158,7 @@ abstract class SS_Object {
// Singleton to create should be the calling class if not Object, // Singleton to create should be the calling class if not Object,
// otherwise the first parameter // otherwise the first parameter
$class = get_called_class(); $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); 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) { static public function get_extra_config_sources($class = null) {
if($class === null) $class = get_called_class(); if($class === null) $class = get_called_class();

View File

@ -91,7 +91,7 @@ class SS_ConfigStaticManifest {
protected $statics; protected $statics;
static protected $initial_classes = array( static protected $initial_classes = array(
'SS_Object', 'ViewableData', 'Injector', 'Director' 'SS_Object', 'Object', 'ViewableData', 'Injector', 'Director'
); );
/** /**

View File

@ -192,7 +192,7 @@ class MySQLiConnector extends DBConnector {
case 'double': case 'double':
$types .= 'd'; $types .= 'd';
break; 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 'resource':
case 'string': case 'string':
case 'NULL': // Take care that a where clause should use "where XX is null" not "where XX = null" case 'NULL': // Take care that a where clause should use "where XX is null" not "where XX = null"

View File

@ -286,7 +286,7 @@ class PDOConnector extends DBConnector {
return PDO::PARAM_NULL; return PDO::PARAM_NULL;
case 'integer': case 'integer':
return PDO::PARAM_INT; 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 'resource':
case 'float': // Not actually returnable from get_type case 'float': // Not actually returnable from get_type
case 'double': case 'double':