Site.php

  1. 7.x-3.x http/Provision/Config/Nginx/Site.php
  2. 7.x-3.x http/Provision/Config/Apache/Ssl/Site.php
  3. 7.x-3.x http/Provision/Config/Nginx/Ssl/Site.php
  4. 7.x-3.x http/Provision/Config/Http/Site.php
  5. 7.x-3.x http/Provision/Config/Apache/Site.php
  6. 7.x-3.x Provision/Context/site.php
  7. 7.x-3.x Provision/Config/Drushrc/Site.php
  8. 7.x-3.x http/Provision/Config/Http/Ssl/Site.php

Classes

Namesort descending Description
Provision_Config_Http_Site Base class for virtual host configuration files.

File

http/Provision/Config/Http/Site.php
View source
  1. <?php
  2. /**
  3. * Base class for virtual host configuration files.
  4. */
  5. class Provision_Config_Http_Site extends Provision_Config_Http {
  6. public $template = 'vhost.tpl.php';
  7. // The template file to use when the site has been disabled.
  8. public $disabled_template = 'vhost_disabled.tpl.php';
  9. public $description = 'virtual host configuration file';
  10. function filename() {
  11. return $this->data['http_vhostd_path'] . '/' . $this->uri;
  12. }
  13. function process() {
  14. parent::process();
  15. if ($this->aliases && !is_array($this->aliases)) {
  16. $this->aliases = explode(",", $this->aliases);
  17. }
  18. $this->aliases = array_filter($this->aliases, 'trim');
  19. if ($this->drush_aliases && !is_array($this->drush_aliases)) {
  20. $this->drush_aliases = explode(",", $this->drush_aliases);
  21. }
  22. $this->drush_aliases = array_filter($this->drush_aliases, 'trim');
  23. if (!$this->site_enabled) {
  24. $this->template = $this->disabled_template;
  25. }
  26. }
  27. }