Skip to content
Aleh Kashnikau edited this page Sep 2, 2015 · 4 revisions

Padawan.php package provides 2 command line scripts:

  • padawan - cli for padawan.php
  • padawan-server - script for starting padawan.php http server

#padawan-server

There are 4 urls:

  • /complete
  • /save
  • /kill
  • /load

You can find all routes here

/complete

HTTP request format:

POST /complete?filepath=%FILEPATH%&line=%LINENUMBER%&column=%COLUMNNUMBER%&path=%PROJECTROOT%

%FILECONTENTS%

Where:

  • %FILEPATH% - relative path to the current file from the project root
  • %LINENUMBER% - cursor's line number
  • %COLUMNNUMBER% - cursor's column number
  • %PROJECTROOT% - path to the project root
  • %FILECONTENTS% - new file contents

HTTP response:

{
    "completion": [
        {
            "description": "%SYMBOL_DESCRIPT%",
            "menu": "%SYMBOL_NAME_FOR_MENU%",
            "name": "%SYMBOL_NAME%",
            "signature": "%SYMBOL_SIGNATURE%"
        }
    ],
    "context": []
}

padawan(CLI)

There are 3 cli commands:

  • generate
  • update
  • plugin

You can find all commands here

plugin

Plugin command accepts 2 arguments: action( add or remove ) and plugin name( e.g. mkusher/padawan-symfony ).

generate

Generate command doesn't have arguments, it will generate index for a project of the current working directory.

Clone this wiki locally