CoreFiles by mySites.guru
MethodDescriptor.php116 lines, 2,607 bytes, from Joomla_4.2.0-beta2-Beta-Full_Package.zip
Raw History Compare with 4.2.0-beta1
md5
1f54c5016bfe106a551b62ce6f5d716b
sha1
b7e0fd642cf4d48ef2e72746a214fee06e05875f
sha256
3f36712327110e225ffac6b7cb95b232a68605c55aa32b9f5b2aa42265bffbe5
<?php
/**
 * @package    Joomla.Administrator
 * @subpackage com_users
 *
 * @copyright  (C) 2022 Open Source Matters, Inc. <https://www.joomla.org>
 * @license    GNU General Public License version 2 or later; see LICENSE.txt
 */

namespace Joomla\Component\Users\Administrator\DataShape;

use Joomla\Component\Users\Administrator\Table\MfaTable;

/**
 * @property  string  $name                Internal code of this MFA Method
 * @property  string  $display             User-facing name for this MFA Method
 * @property  string  $shortinfo           Short description of this MFA Method displayed to the user
 * @property  string  $image               URL to the logo image for this Method
 * @property  bool    $canDisable          Are we allowed to disable it?
 * @property  bool    $allowMultiple       Are we allowed to have multiple instances of it per user?
 * @property  string  $help_url            URL for help content
 * @property  bool    $allowEntryBatching  Allow authentication against all entries of this MFA Method.
 *
 * @since       4.2.0
 */
class MethodDescriptor extends DataShapeObject
{
	/**
	 * Internal code of this MFA Method
	 *
	 * @var   string
	 * @since 4.2.0
	 */
	protected $name = '';

	/**
	 * User-facing name for this MFA Method
	 *
	 * @var   string
	 * @since 4.2.0
	 */
	protected $display = '';

	/**
	 * Short description of this MFA Method displayed to the user
	 *
	 * @var   string
	 * @since 4.2.0
	 */
	protected $shortinfo = '';

	/**
	 * URL to the logo image for this Method
	 *
	 * @var   string
	 * @since 4.2.0
	 */
	protected $image = '';

	/**
	 * Are we allowed to disable it?
	 *
	 * @var   boolean
	 * @since 4.2.0
	 */
	protected $canDisable = true;

	/**
	 * Are we allowed to have multiple instances of it per user?
	 *
	 * @var   boolean
	 * @since 4.2.0
	 */
	protected $allowMultiple = false;

	/**
	 * URL for help content
	 *
	 * @var   string
	 * @since 4.2.0
	 */
	// phpcs:ignore
	protected $help_url = '';

	/**
	 * Allow authentication against all entries of this MFA Method.
	 *
	 * Otherwise authentication takes place against a SPECIFIC entry at a time.
	 *
	 * @var   boolean
	 * @since 4.2.0
	 */
	protected $allowEntryBatching = false;

	/**
	 * Active authentication methods, used internally only
	 *
	 * @var   MfaTable[]
	 * @since 4.2.0
	 * @internal
	 */
	protected $active = [];

	/**
	 * Adds an active MFA method
	 *
	 * @param   MfaTable  $record  The MFA method record to add
	 *
	 * @return void
	 * @since 4.2.0
	 */
	public function addActiveMethod(MfaTable $record)
	{
		$this->active[$record->id] = $record;
	}
}

The same content is in 2 releases, Joomla 4.2.0-beta1 to 4.2.0-beta2. See them all, or every version of this file.