Exemplo n.º 1
0
 private function __construct($contextReferenceId)
 {
     $this->logger = OvoLogger::getLogger(get_class($this));
     $this->sessionName = OvoSession::getName($contextReferenceId);
     self::$instance[$contextReferenceId] = $this;
     $this->contextReferenceId = $contextReferenceId;
     $this->unserializeObjects();
 }
 private function __construct($contextReferenceId)
 {
     self::$instance[$contextReferenceId] = $this;
     $this->logger = OvoLogger::getLogger(get_class($this));
     $this->sessionContextName = OvoSession::getName($contextReferenceId);
     $this->serializer = SessionSerializer::getInstance($contextReferenceId);
     $this->getSessionBeans();
 }
 /**
  * Get the configuration object
  *
  * @param string $context the path to the XML file (for XmlContainer) or the path to the dir source (AnnotationContainer)
  * @param string $type the ConfigurationType type
  *
  * @return ConfigurationLoader
  */
 public static function getConfigurationLoader($context, $type = ConfigurationType::XML)
 {
     if (!isset($context) or !is_string($context)) {
         throw new OvoCommonException('The context reference [' . $context . '] must be the path to XML file or the path to the context dir!');
     }
     $contextReferenceId = self::createContextReferenceId($context);
     OvoSession::init($contextReferenceId);
     $serializer = FactorySerializer::getSerializer($contextReferenceId);
     $configurationLoader = self::getConfigurationType($context, $type, $serializer);
     return new ConfigurationLoader($configurationLoader, $contextReferenceId, $serializer);
 }
Exemplo n.º 4
0
 /**
  * If session already exists, get the name.
  *
  * @param $name string the name of the session
  *
  * @return void
  */
 private static function getSessionName($name)
 {
     OvoSession::$name = $name;
 }