Pinq\Utilities::getTypeOrClass PHP Метод

getTypeOrClass() публичный статический Метод

Returns the type or class of the supplied function
public static getTypeOrClass ( mixed $value ) : string
$value mixed The value
Результат string The type or class
    public static function getTypeOrClass($value)
    {
        return is_object($value) ? get_class($value) : gettype($value);
    }

Usage Example

Пример #1
0
 /**
  * {@inheritDoc}
  * @param Collection|null $source
  */
 public static function from($elements, Iterators\IIteratorScheme $scheme = null, Traversable $source = null)
 {
     if ($source !== null && !$source instanceof Collection) {
         throw new PinqException('Cannot construct %s: expecting source to be type %s or null, %s given', __CLASS__, __CLASS__, Utilities::getTypeOrClass($source));
     }
     return new static($elements, $scheme, $source);
 }
All Usage Examples Of Pinq\Utilities::getTypeOrClass