2 namespace TYPO3\CMS\Extbase\Object;
32 $this->objectContainer = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance(\TYPO3\CMS\Extbase\Object\
Container\Container::class);
52 $properties = get_object_vars($this);
53 unset($properties[
'objectContainer']);
54 return array_keys($properties);
79 return class_exists($objectName,
true);
95 public function get($objectName)
97 $arguments = func_get_args();
98 array_shift($arguments);
99 return $this->objectContainer->getInstance($objectName, $arguments);
117 $arguments = func_get_args();
118 array_shift($arguments);
119 if ($objectName ===
'DateTime') {
120 array_unshift($arguments, $objectName);
121 $instance = call_user_func_array(array(\TYPO3\CMS\Core\Utility\GeneralUtility::class,
'makeInstance'), $arguments);
123 $instance = $this->objectContainer->getInstance($objectName, $arguments);
125 if ($instance instanceof \TYPO3\CMS\Core\SingletonInterface) {
126 throw new \TYPO3\CMS\Extbase\Object\Exception\WrongScopeException(
'Object "' . $objectName .
'" is of not of scope prototype, but only prototype is supported by create()', 1265203124);
140 return $this->objectContainer->getEmptyObject($className);