class ProtectedDirectory
Same name in other branches
- 9 core/lib/Drupal/Core/File/ProtectedDirectory.php \Drupal\Core\File\ProtectedDirectory
- 10 core/lib/Drupal/Core/File/ProtectedDirectory.php \Drupal\Core\File\ProtectedDirectory
- 11.x core/lib/Drupal/Core/File/ProtectedDirectory.php \Drupal\Core\File\ProtectedDirectory
A value object representing a protected directory.
Hierarchy
- class \Drupal\Core\File\ProtectedDirectory
Expanded class hierarchy of ProtectedDirectory
File
-
core/
lib/ Drupal/ Core/ File/ ProtectedDirectory.php, line 8
Namespace
Drupal\Core\FileView source
class ProtectedDirectory {
/**
* The directory title.
*
* @var string
*/
protected $title;
/**
* The directory path.
*
* @var string
*/
protected $path;
/**
* If the directory is private (or public).
*
* @var bool
*/
protected $private;
/**
* ProtectedDirectory constructor.
*
* @param string $title
* The directory title.
* @param string $path
* The path to the directory.
* @param bool $private
* (optional) Whether the directory is private or public (default).
*/
public function __construct($title, $path, $private = FALSE) {
$this->title = $title;
$this->path = $path;
$this->private = $private;
}
/**
* Gets the title.
*
* @return string
* The Title.
*/
public function getTitle() {
return $this->title;
}
/**
* Gets the directory path.
*
* @return string
* The directory path.
*/
public function getPath() {
return $this->path;
}
/**
* Is the directory private (or public).
*
* @return bool
* TRUE if the directory is private, FALSE if it is public.
*/
public function isPrivate() {
return $this->private;
}
}
Members
Title Sort descending | Modifiers | Object type | Summary |
---|---|---|---|
ProtectedDirectory::$path | protected | property | The directory path. |
ProtectedDirectory::$private | protected | property | If the directory is private (or public). |
ProtectedDirectory::$title | protected | property | The directory title. |
ProtectedDirectory::getPath | public | function | Gets the directory path. |
ProtectedDirectory::getTitle | public | function | Gets the title. |
ProtectedDirectory::isPrivate | public | function | Is the directory private (or public). |
ProtectedDirectory::__construct | public | function | ProtectedDirectory constructor. |
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.