-
-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
136 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -10,3 +10,4 @@ Getting started | |
getting_started/logic | ||
getting_started/table | ||
getting_started/tools | ||
getting_started/cli |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,135 @@ | ||
|
||
CLI | ||
=== | ||
|
||
PSX provides several commands which help to develop and debug PSX applications. | ||
In the following we will describe the available commands: | ||
|
||
### debug | ||
|
||
#### `debug:jsonschema` | ||
|
||
Parses the json schema and prints informations about the parsed schema. Can be | ||
used to debug json schemas. | ||
|
||
.. code:: | ||
$ vendor/bin/psx debug:jsonschema schema.json | ||
#### `debug:raml` | ||
|
||
Parses the raml schema and prints informations about the parsed schema. Can be | ||
used to debug raml schemas. | ||
|
||
.. code:: | ||
$ vendor/bin/psx debug:raml schema.json | ||
### generate | ||
|
||
#### `generate:api` | ||
|
||
Generates a new api controller in the source folder under the provided | ||
namespace. I.e. the following command would create the file `src/Acme/Foo.php` | ||
|
||
.. code:: | ||
$ vendor/bin/psx generate:api Acme\Foo connection,http | ||
#### `generate:bootstrap_cache` | ||
|
||
Generates a bootstrap cache file in the cache folder. This file includes common | ||
used classes which can be used to imrpove the performance of your application. | ||
Note this is only needed if you are using PHP < 5.5 | ||
|
||
.. code:: | ||
$ vendor/bin/psx generate:bootstrap_cache | ||
#### `generate:command` | ||
|
||
Generates a new command in the source folder under the provided | ||
namespace. I.e. the following command would create the file `src/Acme/Foo.php` | ||
|
||
.. code:: | ||
$ vendor/bin/psx generate:command Acme\Foo connection,http | ||
#### `generate:controller` | ||
|
||
Generates a new controller in the source folder under the provided namespace. | ||
I.e. the following command would create the file `src/Acme/Foo.php` | ||
|
||
.. code:: | ||
$ vendor/bin/psx generate:controller Acme\Foo connection,http | ||
#### `generate:schema` | ||
|
||
Generates a new schema controller in the source folder under the provided | ||
namespace. I.e. the following command would create the file `src/Acme/Foo.php` | ||
|
||
.. code:: | ||
$ vendor/bin/psx generate:schema Acme\Foo connection,http | ||
#### `generate:table` | ||
|
||
Generates a table class based on an actual table. The sql_ credentials must be | ||
provided in the `configuration.php` to use this command | ||
|
||
.. code:: | ||
$ vendor/bin/psx generate:table Acme\Foo table_name | ||
#### `generate:view` | ||
|
||
Generates a new view controller in the source folder under the provided | ||
namespace. I.e. the following command would create the file `src/Acme/Foo.php` | ||
|
||
.. code:: | ||
$ vendor/bin/psx generate:view Acme\Foo connection,template | ||
### schema | ||
|
||
#### `schema:jsonschema` | ||
|
||
Prints the json schema of a provided route | ||
|
||
.. code:: | ||
$ vendor/bin/psx schema:jsonschema /foo | ||
#### `schema:raml` | ||
|
||
Prints the raml schema of a provided route | ||
|
||
.. code:: | ||
$ vendor/bin/psx schema:raml /foo | ||
#### `schema:swagger` | ||
|
||
Prints the swagger schema of a provided route | ||
|
||
.. code:: | ||
$ vendor/bin/psx schema:swagger /foo | ||
#### `schema:wsdl` | ||
|
||
Prints the wsdl schema of a provided route | ||
|
||
.. code:: | ||
$ vendor/bin/psx schema:wsdl /foo | ||
#### `schema:xsd` | ||
|
||
Prints the xsd schema of a provided route | ||
|
||
.. code:: | ||
$ vendor/bin/psx schema:xsd /foo |