Source
319 *
320 * @param string $className
321 * @return Object
322 */
323 function singleton($className) {
324 global $_SINGLETONS;
325 if(!isset($className)) user_error("singleton() Called without a class", E_USER_ERROR);
326 if(!is_string($className)) user_error("singleton() passed bad class_name: " . var_export($className,true), E_USER_ERROR);
327 if(!isset($_SINGLETONS[$className])) {
328 if(!class_exists($className)) user_error("Bad class to singleton() - $className", E_USER_ERROR);
329 $_SINGLETONS[$className] = Object::strong_create($className,null, true);
330 if(!$_SINGLETONS[$className]) user_error("singleton() Unknown class '$className'", E_USER_ERROR);
331 }
332 return $_SINGLETONS[$className];
333 }
334
Trace
- Bad class to singleton() - CalaisEntitySet
Line 328 of Core.php
- singleton(CalaisEntitySet)
Line 54 of JSONDataFormatter.php
- JSONDataFormatter->convertDataObject(CalendarEvent,)
Line 115 of JSONDataFormatter.php
- JSONDataFormatter->convertDataObjectSet(DataObjectSet)
Line 44 of HomePage.php
- HomePage_Controller->EventsJson()
Line 369 of ViewableData.php
- ViewableData->obj(EventsJson,,,1)
Line 445 of ViewableData.php
- ViewableData->XML_val(EventsJson,,1)
Line 954 of .cache.home.emmohemm.webapps.suddenly_source_controlled.themes.suddenly-v2.templates.EventContent.ss
- include(/home/emmohemm/webapps/suddenly_source_controlled/silverstripe-cache/.cache.home.emmohemm.webapps.suddenly_source_controlled.themes.suddenly-v2.templates.EventContent.ss)
Line 392 of SSViewer.php
- SSViewer->process(SuddenlyEvents_Controller)
Line 342 of ViewableData.php
- ViewableData->renderWith(EventContent)
Line 75 of SuddenlyEvents.php
- SuddenlyEvents_Controller->content(SS_HTTPRequest)
Line 193 of Controller.php
- Controller->handleAction(SS_HTTPRequest)
Line 134 of RequestHandler.php
- RequestHandler->handleRequest(SS_HTTPRequest)
Line 147 of Controller.php
- Controller->handleRequest(SS_HTTPRequest)
Line 199 of ContentController.php
- ContentController->handleRequest(SS_HTTPRequest)
Line 283 of Director.php
- Director::handleRequest(SS_HTTPRequest,Session)
Line 127 of Director.php
- Director::direct(/events/content/27)
Line 127 of main.php