Rev 63 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
| Rev 63 | Rev 65 | ||
|---|---|---|---|
| Line 133... | Line 133... | ||
| 133 |    *   the object is search for by its current ID.
 | 
            133 |    *   the object is search for by its current ID.
 | 
          
| 134 |    * @see Table::find(Model)
 | 
            134 |    * @see Table::find(Model)
 | 
          
| 135 |    * @return Model|null
 | 
            135 |    * @return Model|null
 | 
          
| 136 |    *   This object filled with missing data, or <code>null</code>
 | 
            136 |    *   This object filled with missing data, or <code>null</code>
 | 
          
| 137 |    *   if there is no data for this object
 | 
            137 |    *   if there is no data for this object
 | 
          
| - | 138 |    * @see Table::find(Model)
 | 
          |
| 138 |    */
 | 
            139 |    */
 | 
          
| 139 | public function find ($id = null)  | 
            140 | public function find ($id = null)  | 
          
| 140 |   {
 | 
            141 |   {
 | 
          
| 141 | $class = \get_class($this);  | 
            142 | $class = \get_class($this);  | 
          
| - | 143 | if ($id === null)  | 
          |
| - | 144 |         {
 | 
          |
| - | 145 | $id = $this->{$class::$_persistentId};  | 
          |
| - | 146 |         }
 | 
          |
| - | 147 | ||
| - | 148 | $result = $this->persistentTable->find($id);  | 
          |
| 142 | if ($id !== null)  | 
            149 | if ($id !== null)  | 
          
| 143 |     {
 | 
            150 |     {
 | 
          
| 144 | $this->{$class::$_persistentId} = $id;  | 
            151 | $this->{$class::$_persistentId} = $id;  | 
          
| 145 |     }
 | 
            152 |     }
 | 
          
| 146 | 153 | ||