Elgg  Version master
Local.php
Go to the documentation of this file.
1 <?php
2 
4 
7 
14 final class Local {
15 
23  public static function fromPath($path) {
24  return Fly::createLocal($path);
25  }
26 
36  public static function projectRoot() {
37  static $dir;
38 
39  if ($dir === null) {
40  $dir = self::fromPath(Paths::project());
41  }
42 
43  return $dir;
44  }
45 
53  public static function elggRoot() {
54  static $dir;
55 
56  if ($dir === null) {
57  $dir = self::fromPath(Paths::elgg());
58  }
59 
60  return $dir;
61  }
62 }
static project()
Get the project root (where composer is installed) path with "/".
Definition: Paths.php:25
static elgg()
Get the Elgg codebase path with "/".
Definition: Paths.php:44
static projectRoot()
Get the root composer install directory.
Definition: Local.php:36
$path
Definition: details.php:70
Namespace for generating local filesystems.
Definition: Local.php:14
static elggRoot()
Get the Elgg root directory.
Definition: Local.php:53
static fromPath($path)
Shorthand for generating a new local filesystem.
Definition: Local.php:23
static createLocal($path)
Shorthand for generating a new local filesystem.
Definition: Fly.php:179