for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
/*
* This file is part of the xAPI package.
*
* (c) Christian Flothmann <[email protected]>
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Xabbuh\XApi\Model;
/**
* A user account on an existing system.
* @author Christian Flothmann <[email protected]>
final class Account
{
* The unique id or name used to log in to this account
* @var string
private $name;
* Canonical home page for the system the account is on
private $homePage;
* @param string $name
* @param string $homePage
public function __construct($name = '', $homePage = '')
$this->name = $name;
$this->homePage = $homePage;
}
* Returns the unique id or name used to log in to this account.
* @return string The user name
public function getName()
return $this->name;
* Returns the home page for the system the account is on.
* @return string The home page
public function getHomePage()
return $this->homePage;
* Checks if another account is equal.
* Two accounts are equal if and only if all of their properties are equal.
* @param Account $account The account to compare with
* @return bool True if the accounts are equal, false otherwise
public function equals(Account $account)
if ($this->name !== $account->name) {
return false;
if ($this->homePage !== $account->homePage) {
return true;