Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
D
doctrine-dbal
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Tomáš Trávníček
doctrine-dbal
Commits
4622a71e
Commit
4622a71e
authored
Dec 23, 2006
by
zYne
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
default size for columns
parent
cf939c6d
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
9 deletions
+13
-9
Table.php
lib/Doctrine/Table.php
+13
-9
No files found.
lib/Doctrine/Table.php
View file @
4622a71e
...
...
@@ -335,7 +335,7 @@ class Doctrine_Table extends Doctrine_Configurable implements Countable {
* @param mixed $options
* @return void
*/
final
public
function
setColumn
(
$name
,
$type
,
$length
,
$options
=
array
())
{
final
public
function
setColumn
(
$name
,
$type
,
$length
=
null
,
$options
=
array
())
{
if
(
is_string
(
$options
))
$options
=
explode
(
'|'
,
$options
);
...
...
@@ -348,7 +348,11 @@ class Doctrine_Table extends Doctrine_Configurable implements Countable {
}
}
$name
=
strtolower
(
$name
);
$this
->
columns
[
$name
]
=
array
(
$type
,
$length
,
$options
);
if
(
$length
==
null
)
$length
=
2147483647
;
$this
->
columns
[
$name
]
=
array
(
$type
,
$length
,
$options
);
if
(
isset
(
$options
[
'primary'
]))
{
$this
->
primaryKeys
[]
=
$name
;
...
...
@@ -1009,10 +1013,10 @@ class Doctrine_Table extends Doctrine_Configurable implements Countable {
*/
public
function
invokeSet
(
Doctrine_Record
$record
,
$name
,
$value
)
{
if
(
!
(
$this
->
getAttribute
(
Doctrine
::
ATTR_ACCESSORS
)
&
Doctrine
::
ACCESSOR_SET
))
return
$value
;
$prefix
=
$this
->
getAttribute
(
Doctrine
::
ATTR_ACCESSOR_PREFIX_SET
);
if
(
!
$prefix
)
return
$value
;
$prefix
=
$this
->
getAttribute
(
Doctrine
::
ATTR_ACCESSOR_PREFIX_SET
);
if
(
!
$prefix
)
$prefix
=
'set'
;
$method
=
$prefix
.
$name
;
...
...
@@ -1032,10 +1036,10 @@ class Doctrine_Table extends Doctrine_Configurable implements Countable {
if
(
!
(
$this
->
getAttribute
(
Doctrine
::
ATTR_ACCESSORS
)
&
Doctrine
::
ACCESSOR_GET
))
return
$value
;
$prefix
=
$this
->
getAttribute
(
Doctrine
::
ATTR_ACCESSOR_PREFIX_GET
);
if
(
!
$prefix
)
$prefix
=
$this
->
getAttribute
(
Doctrine
::
ATTR_ACCESSOR_PREFIX_GET
);
if
(
!
$prefix
)
$prefix
=
'get'
;
$method
=
$prefix
.
$name
;
if
(
method_exists
(
$record
,
$method
))
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment