Skip to content

Php Storm

We recommend Php Storm for development.

Before starting, download the XELOS autocompletion archive and extract it.

XELOS Code completion

  • Open the Php Storm Settings (Alt + Shift + S)
  • Go to Languages & Frameworks > PHP
  • Add the extracted stubs folder __doc/php to the Include Path Php Storm Include Path

YAML completion

XELOS is using JSON Schema to document the YAML files.

The JSON Schema files are at __doc/dtd in the archive.

  • Open the Php Storm Settings (Alt + Shift + S)
  • Go to Languages & Frameworks > Schemas and DTDs > JSON Schema Mappings Php Storm JSON Schema
  • Add for each YAML file the corresponding Schema Php Storm JSON Schema

  • config.yml.schema for the file path pattern config.yml

  • database.yml.schema for the file path pattern database.yml
  • license.yml.schema for the file path pattern license.yml

XELOS Template completion

The XML DTDs are at __doc/dtd in the archive.

  • Open the Php Storm Settings (Alt + Shift + S)
  • Go to Languages & Frameworks > Schemas and DTDs
  • Add the URI and selected the the DTD files: XELOS Template DTD

  • URI http://www.xelos.net/dtd/xt for xelos-xt.dtd

  • URI http://www.xelos.net/dtd/xui for xelos-xui.dtd
  • URI http://www.xelos.net/dtd/xlib for xelos-xlib.dtd

XELOS Template file

The kickstarter is generating a template for each page. However, you can create and use your own templates.

  • Open the Php Storm Settings (Alt + Shift + S)
  • Go to Editor > File and Code Templates
  • Create a new file template XELOS Template file
  • Name: XELOS Template
  • Extension: tpl
  • Enable Live Templates: Check the box
  • Insert the following code:
<?xml version="1.0" encoding="UTF-8" ?>
<template 
  xmlns="http://www.w3.org/1999/xhtml" 
  xmlns:xt="http://www.xelos.net/dtd/xt" xmlns:xui="http://www.xelos.net/dtd/xui" xmlns:xlib="http://www.xelos.net/dtd/xlib">

<!-- START $Section_name -->
<xt:echo marker="my_marker" />
<!-- END $Section_name -->

</template>

You can now create XELOS template files and you will have autocompletion if you configured the DTDs in the previous section.