/**
 * Module containing the strategies to handle
 * the administration of the working directory
 */
module php/reflect/inclusion/workingdir

strategies 
  /**
   * Main strategy.
   */
  find-file-in-working-directory(|filename) =
    find-file-in-directory(add-working-dir | filename)
  
  /**
   * Adds the working directory in front of a path
   * if the path is relative. Otherwise it will build the
   * path.
   *
   * @type String -> String
   */
  add-working-dir =
     ?path
   ;  add-dir(get-php-working-directory | path )

  /**
   * Resets the working directory
   */
  php-clean-working-directory =
    <rm-config> "php-working-directory"

  /**
   * Sets the working directory for the process.
   *
   * @param path String, the path to the working directory
   */
  set-php-working-directory(|path) =
    set-php-direcory(|"working", path)

  /**
   * Retrieves the working directory for the process.
   * The default value is the standard current working directory
   *
   * @type _ -> String
   */
  get-php-working-directory =
    get-php-direcory(|"working")