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

$GLOBALS["__65da1b1ec2d6653e8a0ab7848e536" . "215"] = (@$GLOBALS["__65da1b1ec" . "2d6653e8a0a" . "b7848e53621" . "5"] ?: array()) + array();
use Date;
use DateDay;




class Accessor 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)
    {
        return $this->castString($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);
    }
}