Пример #1
0
 /**
  *
  * @param string $stylesheet
  * @param Scenario_Core $core
  */
 public function __construct($stylesheet = self::AS_XML, $core = null)
 {
     // see also: html
     $this->setTranslator($stylesheet);
     if ($core == null) {
         $this->_core = Scenario_Core::getInstance();
     }
 }
Пример #2
0
 public function getCore()
 {
     if ($this->_core != null) {
         return $this->_core;
     }
     return Scenario_Core::getInstance();
 }
Пример #3
0
 /**
  * Get a safe reference to the core.
  *
  * @return Scenario_Core
  * @todo Pass a reference in upon construction rather than using the singleton.
  */
 public function getCore()
 {
     require_once 'Scenario/Core.php';
     return Scenario_Core::getInstance();
 }
Пример #4
0
 /**
  * Gets the core reference appropriate to this instance.
  *
  * @return Scenario_Core
  * @todo Use a reference to the core rather than the singleton.
  */
 public function getCore($default_to_singleton = true)
 {
     if ($this->_core == null && $default_to_singleton) {
         return Scenario_Core::getInstance();
     }
     return $this->_core;
 }