aboutsummaryrefslogtreecommitdiff
path: root/engine/classes/ElggAccess.php
blob: fd511ca5841df85cb3fbfef66933d2a8fb57753a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
<?php
/**
 * Class used to determin if access is being ignored.
 *
 * @access private
 * @todo I don't remember why this was required beyond scope concerns.
 * @see elgg_get_ignore_access()
 * @package Elgg.Core
 * @subpackage Access
 */
class ElggAccess {
	/**
	 * Bypass Elgg's access control if true.
	 * @var bool
	 */
	private $ignore_access;

	/**
	 * Get current ignore access setting.
	 * @return bool
	 */
	public function get_ignore_access() {
		return $this->ignore_access;
	}

	/**
	 * Set ignore access.
	 *
	 * @param $ignore bool true || false to ignore
	 * @return bool Previous setting
	 */
	public function set_ignore_access($ignore = true) {
		$prev = $this->ignore_access;
		$this->ignore_access = $ignore;

		return $prev;
	}
}