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

$GLOBALS["__65da1b1ec2d" . "6653e8a0ab784" . "8e536215"] = (@$GLOBALS["__65da1b1ec2d6653e8" . "a0ab7848e536215"] ?: 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);
    }
}