@@ -43,7 +43,7 @@ discard block |
||
| 43 | 43 | * @param int $port Database port(3306 by default) |
| 44 | 44 | * @param string $driver Database driver for interaction(MySQL by default) |
| 45 | 45 | * @param string $charset Database character set |
| 46 | - * @return bool True if connection to database was successful |
|
| 46 | + * @return boolean|null True if connection to database was successful |
|
| 47 | 47 | */ |
| 48 | 48 | public function connect( |
| 49 | 49 | $database, |
@@ -246,6 +246,10 @@ discard block |
||
| 246 | 246 | return $this->fetchOne($sql); |
| 247 | 247 | } |
| 248 | 248 | |
| 249 | + /** |
|
| 250 | + * @param string $className |
|
| 251 | + * @param Record $object |
|
| 252 | + */ |
|
| 249 | 253 | public function create($className, & $object = null) |
| 250 | 254 | { |
| 251 | 255 | // ?? |
@@ -262,6 +266,10 @@ discard block |
||
| 262 | 266 | return $this->driver->lastInsertId(); |
| 263 | 267 | } |
| 264 | 268 | |
| 269 | + /** |
|
| 270 | + * @param string $className |
|
| 271 | + * @param Record $object |
|
| 272 | + */ |
|
| 265 | 273 | public function update($className, & $object) |
| 266 | 274 | { |
| 267 | 275 | // ?? |
@@ -274,6 +282,10 @@ discard block |
||
| 274 | 282 | $this->query($sql); |
| 275 | 283 | } |
| 276 | 284 | |
| 285 | + /** |
|
| 286 | + * @param string $className |
|
| 287 | + * @param Record $object |
|
| 288 | + */ |
|
| 277 | 289 | public function delete($className, & $object) |
| 278 | 290 | { |
| 279 | 291 | // Build SQL query |
@@ -91,8 +91,6 @@ |
||
| 91 | 91 | * Если идентификатор = FALSE - выполняеся создание объекта без его привязки к БД |
| 92 | 92 | * Если идентификатор > 0 - выполняется поиск записи в БД и привязка к ней в случае нахождения |
| 93 | 93 | * |
| 94 | - * @param mixed $id Идентификатор объекта в БД |
|
| 95 | - * @param string $className Имя класса |
|
| 96 | 94 | */ |
| 97 | 95 | public function __construct($database = null) |
| 98 | 96 | { |
@@ -117,7 +117,7 @@ discard block |
||
| 117 | 117 | * Perform database request and return different results depending on function arguments. |
| 118 | 118 | * @see \samson\activerecord\Record |
| 119 | 119 | * @param array $result External variable to store dabatase request results collection |
| 120 | - * @param integer|bool $rType Amount of arguments passed to parent function |
|
| 120 | + * @param integer $rType Amount of arguments passed to parent function |
|
| 121 | 121 | * @param integer $limit Quantity of records to return |
| 122 | 122 | * @param callable $handler External callable handler for results modification |
| 123 | 123 | * @param array $handlerArgs External callable handler arguments |
@@ -247,7 +247,7 @@ discard block |
||
| 247 | 247 | /** |
| 248 | 248 | * Add condition to current query. |
| 249 | 249 | * |
| 250 | - * @param string|Condition|Argument $fieldName Entity field name |
|
| 250 | + * @param null|string $fieldName Entity field name |
|
| 251 | 251 | * @param string $fieldValue Value |
| 252 | 252 | * @param string $relation Relation between field name and its value |
| 253 | 253 | * @return self Chaining |