Jackalope\Transport\DoctrineDBAL\Client::getAccessibleWorkspaceNames PHP Method

getAccessibleWorkspaceNames() public method

{@inheritDoc}
    public function getAccessibleWorkspaceNames()
    {
        $query = "SELECT DISTINCT name FROM phpcr_workspaces";
        $stmt = $this->getConnection()->executeQuery($query);
        return $stmt->fetchAll(\PDO::FETCH_COLUMN);
    }

Usage Example

 /**
  * {@inheritDoc}
  */
 public function getAccessibleWorkspaceNames()
 {
     $cacheKey = 'workspaces';
     $cacheKey = $this->sanitizeKey($cacheKey);
     $workspaces = $this->caches['meta']->fetch($cacheKey);
     if (!$workspaces) {
         $workspaces = parent::getAccessibleWorkspaceNames();
         $this->caches['meta']->save($cacheKey, $workspaces);
     }
     return $workspaces;
 }