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 XApi\Repository\Api\Mapping;
use Xabbuh\XApi\Model\Verb;
/**
* A {@link Verb} mapped to a storage backend.
* @author Christian Flothmann <[email protected]>
class MappedVerb
{
public $identifier;
public $id;
public $display;
public function getModel()
return new Verb($this->id, $this->display);
}
public function equals(MappedVerb $verb)
if ($this->identifier !== $verb->identifier) {
return false;
if ($this->id !== $verb->id) {
if ($this->display !== $verb->display) {
return true;
public static function createFromModel(Verb $verb)
$mappedVerb = new MappedVerb();
$mappedVerb->id = $verb->getId();
$mappedVerb->display = $verb->getDisplay();
return $mappedVerb;