Bonjour,

je fais face a un petit probleme :

quand je fais un var_dump de mon objet apres un ->find($id); je me retourve avec un objet bizarre de l'espace au lieux de m'on occurence.

une idée?

merci d'avance.

Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
 
$id = $this->_getParam('id');   
 
        $q = new Questions();
        $q->find($id);
        var_dump($q);
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
 
object(Questions)[51]
  protected '_tableInstance' => null
  protected '_definition' => null
  protected '_definitionConfigName' => null
  protected '_db' => 
    object(Zend_Db_Adapter_Sqlsrv)[8]
      protected '_config' => 
        array
          'dbname' => string '*******' (length=11)
          'username' => string '****' (length=5)
          'password' => string '****' (length=6)
          'adapter' => string 'sqlsrv' (length=6)
          'host' => string '********' (length=19)
          'charset' => null
          'persistent' => boolean false
          'options' => 
            array
              ...
          'driver_options' => 
            array
              ...
      protected '_lastInsertId' => null
      protected '_lastInsertSQL' => string 'SELECT SCOPE_IDENTITY() as Current_Identity' (length=43)
      protected '_numericDataTypes' => 
        array
          0 => int 0
          1 => int 1
          2 => int 2
          'INT' => int 0
          'SMALLINT' => int 0
          'TINYINT' => int 0
          'BIGINT' => int 1
          'DECIMAL' => int 2
          'FLOAT' => int 2
          'MONEY' => int 2
          'NUMERIC' => int 2
          'REAL' => int 2
          'SMALLMONEY' => int 2
      protected '_defaultStmtClass' => string 'Zend_Db_Statement_Sqlsrv' (length=24)
      protected '_fetchMode' => int 2
      protected '_profiler' => 
        object(Zend_Db_Profiler)[9]
          protected '_queryProfiles' => 
            array
              ...
          protected '_enabled' => boolean true
          protected '_filterElapsedSecs' => null
          protected '_filterTypes' => null
      protected '_defaultProfilerClass' => string 'Zend_Db_Profiler' (length=16)
      protected '_connection' => resource(78, SQL Server Connection)
      protected '_caseFolding' => int 0
      protected '_autoQuoteIdentifiers' => boolean true
      protected '_allowSerialization' => boolean true
      protected '_autoReconnectOnUnserialize' => boolean false
  protected '_schema' => null
  protected '_name' => string 'questions' (length=9)
  protected '_cols' => 
    array
      0 => string 'id' (length=2)
      1 => string 'subject' (length=7)
      2 => string 'id_user' (length=7)
      3 => string 'state' (length=5)
  protected '_primary' => 
    array
      1 => string 'id' (length=2)
  protected '_identity' => int 1
  protected '_sequence' => boolean true
  protected '_metadata' => 
    array
      'id' => 
        array
          'SCHEMA_NAME' => null
          'TABLE_NAME' => string 'questions' (length=9)
          'COLUMN_NAME' => string 'id' (length=2)
          'COLUMN_POSITION' => int 1
          'DATA_TYPE' => string 'int' (length=3)
          'DEFAULT' => null
          'NULLABLE' => boolean false
          'LENGTH' => int 4
          'SCALE' => int 0
          'PRECISION' => int 10
          'UNSIGNED' => null
          'PRIMARY' => boolean true
          'PRIMARY_POSITION' => int 1
          'IDENTITY' => boolean true
      'subject' => 
        array
          'SCHEMA_NAME' => null
          'TABLE_NAME' => string 'questions' (length=9)
          'COLUMN_NAME' => string 'subject' (length=7)
          'COLUMN_POSITION' => int 2
          'DATA_TYPE' => string 'text' (length=4)
          'DEFAULT' => null
          'NULLABLE' => boolean false
          'LENGTH' => int 2147483647
          'SCALE' => null
          'PRECISION' => int 2147483647
          'UNSIGNED' => null
          'PRIMARY' => boolean false
          'PRIMARY_POSITION' => null
          'IDENTITY' => boolean false
      'id_user' => 
        array
          'SCHEMA_NAME' => null
          'TABLE_NAME' => string 'questions' (length=9)
          'COLUMN_NAME' => string 'id_user' (length=7)
          'COLUMN_POSITION' => int 3
          'DATA_TYPE' => string 'int' (length=3)
          'DEFAULT' => null
          'NULLABLE' => boolean false
          'LENGTH' => int 4
          'SCALE' => int 0
          'PRECISION' => int 10
          'UNSIGNED' => null
          'PRIMARY' => boolean false
          'PRIMARY_POSITION' => null
          'IDENTITY' => boolean false
      'state' => 
        array
          'SCHEMA_NAME' => null
          'TABLE_NAME' => string 'questions' (length=9)
          'COLUMN_NAME' => string 'state' (length=5)
          'COLUMN_POSITION' => int 4
          'DATA_TYPE' => string 'int' (length=3)
          'DEFAULT' => null
          'NULLABLE' => boolean false
          'LENGTH' => int 4
          'SCALE' => int 0
          'PRECISION' => int 10
          'UNSIGNED' => null
          'PRIMARY' => boolean false
          'PRIMARY_POSITION' => null
          'IDENTITY' => boolean false
  protected '_metadataCache' => null
  protected '_metadataCacheInClass' => boolean true
  protected '_rowClass' => string 'Zend_Db_Table_Row' (length=17)
  protected '_rowsetClass' => string 'Zend_Db_Table_Rowset' (length=20)
  protected '_referenceMap' => 
    array
      empty
  protected '_dependentTables' => 
    array
      empty
  protected '_defaultSource' => string 'defaultNone' (length=11)
  protected '_defaultValues' => 
    array
      empty