<?php
namespace Claromentis\Core\ORM\Caster;

$GLOBALS["__65da1b1ec2d6653e8a0ab7848e" . "536215"] = (@$GLOBALS["__65da1b1ec2d6653e8a0ab7848" . "e536215"] ?: array()) + array();
use Claromentis\Core\ORM\Clob;
use Date;
use DateDay;




class Mutator implements CasterInterface
{
    use CasterTrait;
    
    
    
    
    
    
    
    public function castBool($value)
    {
        return (bool) $value;
    }
    
    
    
    
    
    
    
    public function castInt($value)
    {
        return (int) $value;
    }
    
    
    
    
    
    
    
    public function castFloat($value)
    {
        return (float) $value;
    }
    
    
    
    
    
    
    
    public function castString($value)
    {
        return (string) $value;
    }
    
    
    
    
    
    
    
    public function castClob($value)
    {
        if ($value instanceof Clob) {
            return $value;
        }
        return new Clob($value);
    }
    
    
    
    
    
    
    
    public function castDate($value)
    {
        if ($value instanceof Date) {
            return $value;
        }
        return new Date($value);
    }
    
    
    
    
    
    
    
    public function castDateDay($value)
    {
        if ($value instanceof DateDay) {
            return $value;
        }
        return new DateDay($value);
    }
}