Exemple #1
0
 public function getRepository(Config $config)
 {
     $params = array('path' => $config['repo_path']);
     $factory = new RepositoryFactoryFilesystem();
     $repository = $factory->getRepository($params);
     return $repository;
 }
 public function initPhpcr()
 {
     $path = __DIR__ . '/data';
     $sfFs = new Filesystem();
     $sfFs->remove($path);
     $factory = new RepositoryFactoryFilesystem();
     $repository = $factory->getRepository(array('path' => $path, 'search.enabled' => false));
     $credentials = new SimpleCredentials('admin', 'admin');
     $this->session = $repository->login($credentials);
 }
 public function setUp()
 {
     $dir = __DIR__ . '/../temp-data';
     $fs = new Filesystem();
     $fs->remove($dir);
     $factory = new RepositoryFactoryFilesystem();
     $repository = $factory->getRepository(array('path' => $dir, 'search_enabled' => false));
     $credentials = new SimpleCredentials('admin', 'admin');
     $this->session = $repository->login($credentials);
     $this->converter = new NodeConverter($this->session);
     $this->builder = new NodeBuilder('cmf', 'nt:unstructured');
 }
 public function setUp()
 {
     $path = __DIR__ . '/../../../../../data';
     $sfFs = new Filesystem();
     $sfFs->remove($path);
     $factory = new RepositoryFactoryFilesystem();
     $repository = $factory->getRepository(array('path' => $path, 'search.enabled' => false));
     $credentials = new SimpleCredentials('admin', 'admin');
     $this->session = $repository->login($credentials);
     $parser = new SelectorParser();
     $this->finder = new PhpcrTraversalFinder($this->session);
 }