File "TypeMatcher.php"
Full Path: /home/fundopuh/trader.fxex.org/vendor/myclabs/deep-copy/src/DeepCopy/TypeMatcher/TypeMatcher.php
File size: 468 bytes
MIME-type: text/x-php
Charset: utf-8
<?php
namespace DeepCopy\TypeMatcher;
class TypeMatcher
{
/**
* @var string
*/
private $type;
/**
* @param string $type
*/
public function __construct($type)
{
$this->type = $type;
}
/**
* @param mixed $element
*
* @return boolean
*/
public function matches($element)
{
return is_object($element) ? is_a($element, $this->type) : gettype($element) === $this->type;
}
}