Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

[DBAL-683] Fix link to known vendor issues in documentation #431

Merged
merged 1 commit into from

3 participants

@deeky666
Collaborator

No description provided.

@doctrinebot
Collaborator

Hello,

thank you for creating this pull request. I have automatically opened an issue
on our Jira Bug Tracker for you. See the issue link:

http://www.doctrine-project.org/jira/browse/DBAL-684

We use Jira to track the state of pull requests and the versions they got
included in.

@guilhermeblanco guilhermeblanco merged commit 439e33a into doctrine:master
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Nov 26, 2013
  1. @deeky666

    fix link in documentation

    deeky666 authored
This page is out of date. Refresh to see the latest.
Showing with 10 additions and 10 deletions.
  1. +10 −10 docs/en/reference/types.rst
View
20 docs/en/reference/types.rst
@@ -38,7 +38,7 @@ instances is abstracted through a static get method
.. note::
- See the `Known Vendor Issue <./../known-vendor-issues>`_ section
+ See the `Known Vendor Issue <./known-vendor-issues>`_ section
for details about the different handling of microseconds and
timezones across all the different vendors.
@@ -100,39 +100,39 @@ Now we implement our ``Doctrine\DBAL\Types\Type`` instance:
<?php
namespace My\Project\Types;
-
+
use Doctrine\DBAL\Types\Type;
use Doctrine\DBAL\Platforms\AbstractPlatform;
-
+
/**
* My custom datatype.
*/
class MoneyType extends Type
{
const MONEY = 'money'; // modify to match your type name
-
+
public function getSqlDeclaration(array $fieldDeclaration, AbstractPlatform $platform)
{
return 'MyMoney';
}
-
+
public function convertToPHPValue($value, AbstractPlatform $platform)
{
return new Money($value);
}
-
+
public function convertToDatabaseValue($value, AbstractPlatform $platform)
{
return $value->toDecimal();
}
-
+
public function getName()
{
return self::MONEY;
}
}
-The job of Doctrine-DBAL is to transform your type into SQL declaration. You can modify the SQL declaration Doctrine will produce. At first, you must to enable this feature by overriding the canRequireSQLConversion method:
+The job of Doctrine-DBAL is to transform your type into SQL declaration. You can modify the SQL declaration Doctrine will produce. At first, you must to enable this feature by overriding the canRequireSQLConversion method:
::
@@ -142,7 +142,7 @@ The job of Doctrine-DBAL is to transform your type into SQL declaration. You can
return true;
}
-Then you override the methods convertToPhpValueSQL and convertToDatabaseValueSQL :
+Then you override the methods convertToPhpValueSQL and convertToDatabaseValueSQL :
::
@@ -151,7 +151,7 @@ Then you override the methods convertToPhpValueSQL and convertToDatabaseValueSQL
{
return 'MyMoneyFunction(\''.$sqlExpr.'\') ';
}
-
+
public function convertToDatabaseValueSQL($sqlExpr, AbstractPlatform $platform)
{
return 'MyFunction('.$sqlExpr.')';
Something went wrong with that request. Please try again.