public function GetRenderScope() { /*// @return array allow other libraries to attach data to the render system to create a variable to be accessable within theme templates. the scope is an associative array passed around by reference. in the theme file it will extract the array into variables. //*/ $scope = ['surface' => $this]; Ki::Flow('surface-render-scope', [&$scope]); return $scope; }
<?php namespace Nether; use Nether; //////////////// //////////////// if (class_exists('Nether\\Ki')) { Ki::Queue('nether-shutdown', function () { /*// on system shutdown run through all the objects stored in the stash and execute their Shutdown method if they have one. this will allow things to clean up and store anything last minute if they need it. //*/ foreach (array_keys(Stash::$Instances) as $key) { if (method_exists(Stash::$Instances[$key], 'Shutdown')) { Stash::$Instances[$key]->Shutdown(); } } return; }); } //////////////// //////////////// final class Stash { /*// a static singleton class for passing objects throughout the current instance of the application. the stash is designed to hold objects of importance that should only ever exist once (e.g. singletons). //*/