public function quote($var)
    {
        if(is_null($var) || strtoupper($var) == 'NULL')
            return 'NULL';

        if ($var instanceof Date)
            $var = $this->DateFactory->toStorageDate($var)->toMySQLDate();

        return $this->getConnection()->quote($var);
    }
public function quote($var)
    {
        if(is_null($var) || strtoupper($var) == 'NULL')
            return 'NULL';

        if ($var instanceof Date)
            $var = $this->DateFactory->toStorageDate($var)->toMySQLDate();

        return $this->getConnection()->quote($var);
    }
public function quote ( $ var ) { if ( is_null ( $ var ) || strtoupper ( $ var ) == 'NULL' ) return 'NULL' ; if ( $ var instanceof Date ) $ var = $ this -> DateFactory -> toStorageDate ( $ var ) -> toMySQLDate ( ) ; return $ this -> getConnection ( ) -> quote ( $ var ) ; }
Returns escaped value automatically wrapped in single quotes

NOTE: Will convert Date types into strings for database entry

@param mixed $var Value to escape and quote

@return string Escaped and quoted string value ready for a SQL statement
Returns escaped value automatically wrapped in single quotes