CoreFiles by mySites.guru
UserFactoryInterface.php44 lines, 952 bytes, from Joomla_5.2.5-Stable-Full_Package.zip
Raw History Compare with 5.2.4
md5
5257acae8c591fb0d293da86db6e8e32
sha1
c41dd71aa31198b68ddbbfbce5437793ffc79283
sha256
4b63aacd62ed05b54547fc263c6cadfb52a262542ca080f458525705edcea119
<?php

/**
 * Joomla! Content Management System
 *
 * @copyright  (C) 2019 Open Source Matters, Inc. <https://www.joomla.org>
 * @license    GNU General Public License version 2 or later; see LICENSE.txt
 */

namespace Joomla\CMS\User;

// phpcs:disable PSR1.Files.SideEffects
\defined('_JEXEC') or die;
// phpcs:enable PSR1.Files.SideEffects

/**
 * Interface defining a factory which can create User objects
 *
 * @since  4.0.0
 */
interface UserFactoryInterface
{
    /**
     * Method to get an instance of a user for the given id.
     *
     * @param   int  $id  The id
     *
     * @return  User
     *
     * @since   4.0.0
     */
    public function loadUserById(int $id): User;

    /**
     * Method to get an instance of a user for the given username.
     *
     * @param   string  $username  The username
     *
     * @return  User
     *
     * @since   4.0.0
     */
    public function loadUserByUsername(string $username): User;
}

The same content is in 225 releases, Joomla 4.2.1 to 6.2.1-rc1. See them all, or every version of this file.