class Provision_Config_Drushrc_Alias

Class to write an alias records.


Expanded class hierarchy of Provision_Config_Drushrc_Alias


Contains filters are case sensitive
Namesort descending Modifiers Type Description
Provision_Config::$context public property A Provision_Context object thie configuration relates to.
Provision_Config::$data public property Associate array of variables to make available to the template.
Provision_Config::$data_store_class protected property An optional data store class to instantiate for this config.
Provision_Config::$group protected property Unix group name for the created file.
Provision_Config::$store public property The data store.
Provision_Config::file_put_contents function
Provision_Config::load_template private function Load template from filename().
Provision_Config::render_template private function Render template, making variables available from $variables associative array.
Provision_Config::unlink function Remove configuration file as specified by filename().
Provision_Config::write function Write out this configuration.
Provision_Config::__get function Forward $this->... to $this->context->... object.
Provision_Config_Drushrc::$context_name protected property
Provision_Config_Drushrc::$description public property If set, replaces file name in log messages. Overrides Provision_Config::$description
Provision_Config_Drushrc::$mode protected property Octal Unix mode for permissons of the created file. Overrides Provision_Config::$mode
Provision_Config_Drushrc::load_data function
Provision_Config_Drushrc::process function Process and add to $data before writing the configuration. Overrides Provision_Config::process
Provision_Config_Drushrc_Alias::$template public property Template file, a PHP file which will have access to $this and variables as defined in $data. Overrides Provision_Config_Drushrc::$template
Provision_Config_Drushrc_Alias::filename function The filename where the configuration is written. Overrides Provision_Config_Drushrc::filename
Provision_Config_Drushrc_Alias::__construct function Overrides Provision_Config_Drushrc::__construct


Provision/Config/Drushrc/Alias.php, line 10
Provides the Provision_Config_Drushrc_Alias class.

View source
class Provision_Config_Drushrc_Alias extends Provision_Config_Drushrc {
  public $template = 'provision_drushrc_alias.tpl.php';

   * @param $name
   *   String '\@name' for named context.
   * @param $options
   *   Array of string option names to save.
  function __construct($context, $data = array()) {
    parent::__construct($context, $data);
    $this->data = array(
      'aliasname' => ltrim($context, '@'),
      'options' => $data,

  function filename() {
    return drush_server_home() . '/.drush/' . $this->data['aliasname'] . '.alias.drushrc.php';