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

$GLOBALS["__65da1b1ec2d6" . "653e8a0ab7848e" . "536215"] = (@$GLOBALS["__65da1b1" . "ec2d6653e" . "8a0ab7848" . "e536215"] ?: 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);
    }
}