Alias.php

Provides the Provision_Config_Drushrc_Alias class.

Classes

Namesort descending Description
Provision_Config_Drushrc_Alias Class to write an alias records.

File

Provision/Config/Drushrc/Alias.php
View source
  1. <?php
  2. /**
  3. * @file
  4. * Provides the Provision_Config_Drushrc_Alias class.
  5. */
  6. /**
  7. * Class to write an alias records.
  8. */
  9. class Provision_Config_Drushrc_Alias extends Provision_Config_Drushrc {
  10. public $template = 'provision_drushrc_alias.tpl.php';
  11. /**
  12. * @param $name
  13. * String '\@name' for named context.
  14. * @param $options
  15. * Array of string option names to save.
  16. */
  17. function __construct($context, $data = array()) {
  18. parent::__construct($context, $data);
  19. $this->data = array(
  20. 'aliasname' => ltrim($context, '@'),
  21. 'options' => $data,
  22. );
  23. }
  24. function filename() {
  25. return drush_server_home() . '/.drush/' . $this->data['aliasname'] . '.alias.drushrc.php';
  26. }
  27. }