File "Everybody_Else.php"

Full Path: /home/siazco/grocery.siazco.se/wp-content/plugins/better-wp-security/core/modules/user-groups/Everybody_Else.php
File size: 745 bytes
MIME-type: text/x-php
Charset: utf-8

<?php

namespace iThemesSecurity\User_Groups;

use iThemesSecurity\User_Groups\Repository\Repository;

final class Everybody_Else implements Matchable {

	const ID = 'everybody-else';

	/** @var Repository */
	private $repository;

	/**
	 * Everybody_Else constructor.
	 *
	 * @param Repository $repository
	 */
	public function __construct( Repository $repository ) { $this->repository = $repository; }

	public function matches( Match_Target $target ) {
		foreach ( $this->repository->all() as $user_group ) {
			if ( $user_group->matches( $target ) ) {
				return false;
			}
		}

		return true;
	}

	public function get_id() {
		return self::ID;
	}

	public function get_label() {
		return __( 'Everybody Else', 'better-wp-security' );
	}
}