/**
  * Normally a RAISE Factory does'nt have any parameters
  * The Factory normally will do his business logic in a black box.
  * In other words, the Factory will request the necessary data to work
  * through the RAISE Managers
  */
 public function __construct()
 {
     $raiseResources = Json::getInstance()->convert(DatabaseManager::getInstance()->fetchAll(Constants::getInstance()->get('metaResourcesQuery')), new ResourceModel());
     $this->addSet($raiseResources);
 }
 /**
  * Normally a RAISE Factory does not have any parameters
  * The Factory normally will do its business logic in a black box.
  * In other words, the Factory will request the necessary data to work
  * through the RAISE Managers
  */
 public function __construct()
 {
     $raiseMessages = Json::getInstance()->convert($this->collectData(DatabaseManager::getInstance()->fetchAll(Constants::getInstance()->get('raiseMessagesQuery'))), new MessageModel());
     $this->addSet($raiseMessages);
 }
 /**
  * Normally a RAISE Factory does'nt have any parameters
  * The Factory normally will do his business logic in a black box.
  * In other words, the Factory will request the necessary data to work
  * through the RAISE Managers
  *
  * @param int $resourceId Resource Related Identifier
  */
 public function __construct($resourceId = 0)
 {
     $raiseProperties = Json::getInstance()->convert(DatabaseManager::getInstance()->fetchAll(Constants::getInstance()->get('specificPropertiesQuery'), [':RSRC_ID' => $resourceId]), new PropertyModel());
     $this->addSet($raiseProperties);
 }
 /**
  * Set the Token for the Session by a token hash identifier
  * This method populates the TokenModel and return a boolean
  * saying if the Token exists or not
  *
  * @param string $tokenHash Token Identifier
  */
 public function setToken($tokenHash = '')
 {
     if (($tokenDetails = DatabaseManager::getInstance()->fetch(Constants::getInstance()->get('specificTokenDetailsQuery'), [':DVC_TOKEN' => $tokenHash])) != null) {
         $this->sessionToken = Json::getInstance()->convert($tokenDetails, new TokenModel());
     }
 }
 /**
  * Add a Settings Block by Json Mapper
  *
  * @param SettingsInterface $itemInstance
  * @param array $itemProperties
  */
 public function addItem($itemInstance, array $itemProperties)
 {
     $this->getFactory()->add(Json::getInstance()->convert((object) $itemProperties, $itemInstance));
 }