Skip to content

Commit

Permalink
use UUIDHelper::isUUID($id)
Browse files Browse the repository at this point in the history
  • Loading branch information
uwej711 committed Mar 26, 2013
1 parent fcd5190 commit 076c7d4
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/PHPCR/Util/Console/Command/DumpCommand.php
Expand Up @@ -21,6 +21,7 @@

namespace PHPCR\Util\Console\Command;

use PHPCR\Util\UUIDHelper;
use Symfony\Component\Console\Command\Command;
use PHPCR\ItemNotFoundException;
use PHPCR\RepositoryException;
Expand Down Expand Up @@ -115,10 +116,10 @@ protected function execute(InputInterface $input, OutputInterface $output)
}

try {
if (strpos($identifier, '/') === 0) {
$node = $session->getNode($identifier);
} else {
if (UUIDHelper::isUUID($identifier)) {
$node = $session->getNodeByIdentifier($identifier);
} else {
$node = $session->getNode($identifier);
}
$walker->traverse($node, $input->getOption('depth'));
} catch (RepositoryException $e) {
Expand Down

0 comments on commit 076c7d4

Please sign in to comment.