• Increase font size
  • Default font size
  • Decrease font size
Home Software Automap Automap advanced concepts - Directives

Automap advanced concepts - Directives

E-mail Print
Read : 9,450 times
(0 votes, average 0 out of 5)
Article Index
Automap advanced concepts
Base path
Structure of a map file
All Pages


In rare cases, you may want to modify the behavior of the scanner program. You may, for instance, explictely declare a symbol definition that the scanner is unable to detect, or ask it not to register a given symbol. You may also ask the scanner to ignore every symbol defined in the file.

All of this is possible using directives you include in your PHP scripts.

The general format of directives is described below :

// <Automap>:directive args

which means :

  • a line starting with '// <Automap>:' (one or more spaces after '//'),
  • then the directive, optionally followed with arguments

Directives may appear anywhere in the script file and apply to the whole file.

The following directives are available :


// <Automap>:ignore-file

This directive causes the scanner to ignore every symbol defined in this script file.


// <Automap>:declare <type> <name>

This is an explicit symbol declaration :

  • <type> is one of {function|constant|class}.
  • <name> is the symbol name.

Example :

// <Automap>:declare class MyClass

A class symbol named 'MyClass' will be added to the map and associated with this script file. Of course, when using this directive, it is your responsibility to ensure that the given symbol is defined when the script is included.


// <Automap>:ignore <type> <name>

This asks the scanner to ignore a given symbol in this file:

  • <type> is one of {function|constant|class}.
  • <name> is the symbol name.

Note that :

  • The 'ignore' directive is valid even if it appears after the symbol declaration.
  • The directive is valid for this script file only.

Example :

class MyClass
// <Automap>:ignore class MyClass

In this case, the 'MyClass' class won't be registered in the map. Of course, it can still be registered if also defined in another file.


Please login or register to add a comment