Skip to content

Commit f81d323

Browse files
committed
Updated README
1 parent 7748134 commit f81d323

File tree

4 files changed

+23
-59
lines changed

4 files changed

+23
-59
lines changed

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
vendor
2+
composer.lock

README.md

Lines changed: 15 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,9 @@ To connect to a doctrine-dbal PHPCR repository:
1212
Full definition:
1313

1414
````bash
15-
$ php bin/phpcr --help
15+
./bin/phpcrsh --help
1616
Usage:
17-
phpcr_shell [-h|--help] [-v|--verbose] [-V|--version] [--ansi] [--no-ansi] [-t|--transport="..."] [-pu|--phpcr_username="..."] [-pp|--phpcr_password[="..."]] [-pw|--phpcr_workspace[="..."]] [-du|--db_username="..."] [-dn|--db_name="..."] [-dp|--db_password[="..."]] [-dh|--db_host="..."] [-dd|--db_driver="..."] [-dP|--db_path="..."]
17+
phpcr_shell [-h|--help] [-v|--verbose] [-V|--version] [--ansi] [--no-ansi] [-t|--transport="..."] [-pu|--phpcr-username="..."] [-pp|--phpcr-password[="..."]] [-pw|--phpcr-workspace[="..."]] [-du|--db-username="..."] [-dn|--db-name="..."] [-dp|--db-password[="..."]] [-dh|--db-host="..."] [-dd|--db-driver="..."] [-dP|--db-path="..."] [-url|--repo-url="..."]
1818

1919
Options:
2020
--help (-h) Display this help message.
@@ -23,23 +23,24 @@ Options:
2323
--ansi Force ANSI output.
2424
--no-ansi Disable ANSI output.
2525
--transport (-t) Transport to use. (default: "doctrine-dbal")
26-
--phpcr_username (-pu) PHPCR Username. (default: "admin")
27-
--phpcr_password (-pp) PHPCR Password. (default: "admin")
28-
--phpcr_workspace (-pw) PHPCR Workspace. (default: "default")
29-
--db_username (-du) Database Username. (default: "root")
30-
--db_name (-dn) Database Name. (default: "phpcr")
31-
--db_password (-dp) Database Password.
32-
--db_host (-dh) Database Host. (default: "localhost")
33-
--db_driver (-dd) Database Transport. (default: "pdo_mysql")
34-
--db_path (-dP) Database Path.
26+
--phpcr-username (-pu) PHPCR Username. (default: "admin")
27+
--phpcr-password (-pp) PHPCR Password. (default: "admin")
28+
--phpcr-workspace (-pw) PHPCR Workspace. (default: "default")
29+
--db-username (-du) Database Username. (default: "root")
30+
--db-name (-dn) Database Name. (default: "phpcr")
31+
--db-password (-dp) Database Password.
32+
--db-host (-dh) Database Host. (default: "localhost")
33+
--db-driver (-dd) Database Transport. (default: "pdo_mysql")
34+
--db-path (-dP) Database Path.
35+
--repo-url (-url) URL of repository (e.g. for jackrabbit). (default: "http://localhost:8080/server/")
3536
````
3637

3738
## Executing Select Queries
3839

3940
JCR_SQL2 Select queries can be executed in the same way as in the MySQL shell:
4041

4142
````bash
42-
PHPCR > select * from nt:unstructured;
43+
PHPCR > SELECT * FROM nt:unstructured;
4344
0
4445
nt:unstructured
4546
/
@@ -72,33 +73,12 @@ PHPCR > pwd
7273
PHPCR > mv foobar /barfoo
7374
````
7475

75-
All available commands:
76+
List all available commands with the `list` command:
7677

7778
````bash
78-
Welcome to the PHPCR shell (1.0).
79-
80-
At the prompt, type help for some help,
81-
or list to get a list of available commands.
82-
83-
To exit the shell, type ^D.
84-
85-
PHPCR > help
86-
PHPCR version 1.0
87-
88-
Usage:
89-
[options] command [arguments]
90-
91-
Options:
92-
--help -h Display this help message.
93-
--quiet -q Do not output any message.
94-
--verbose -v Increase verbosity of messages.
95-
--version -V Display this application version.
96-
--ansi Force ANSI output.
97-
--no-ansi Disable ANSI output.
98-
--no-interaction -n Do not ask any interactive question.
99-
10079
Available commands:
10180
cd Change the current path
81+
exit Logout and quit the shell
10282
help Displays help for a command
10383
list Lists commands
10484
ls Alias for dump

src/PHPCR/Shell/Console/Application/ShellApplication.php

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,10 +34,12 @@
3434
use Symfony\Component\Console\Input\ArrayInput;
3535
use PHPCR\Shell\Console\Command\Shell\ExitCommand;
3636
use PHPCR\Shell\Console\TransportInterface;
37+
use PHPCR\Shell\Console\Command\Shell\WorkspaceChangeCommand;
3738

3839
class ShellApplication extends Application
3940
{
4041
protected $transports;
42+
protected $credentials;
4143

4244
public function __construct(InputInterface $input, $transports = array())
4345
{
@@ -125,6 +127,10 @@ private function getSession($input)
125127
return $session;
126128
}
127129

130+
public function changeWorkspace($workspace)
131+
{
132+
}
133+
128134
private function getTransport(InputInterface $input)
129135
{
130136
$transportName = $input->getOption('transport');

src/PHPCR/Shell/Console/Command/Shell/WorkspaceChangeCommand.php

Lines changed: 0 additions & 24 deletions
This file was deleted.

0 commit comments

Comments
 (0)