@@ -4,7 +4,6 @@ |
||
| 4 | 4 | use Behat\Behat\Context\SnippetAcceptingContext; |
| 5 | 5 | use Behat\Behat\Tester\Exception\PendingException; |
| 6 | 6 | use Behat\Gherkin\Node\PyStringNode; |
| 7 | -use Behat\Gherkin\Node\TableNode; |
|
| 8 | 7 | |
| 9 | 8 | /** |
| 10 | 9 | * Defines application features from the specific context. |
@@ -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 |
@@ -97,7 +97,7 @@ |
||
| 97 | 97 | * Perform database request and return different results depending on function arguments. |
| 98 | 98 | * @see \samson\activerecord\Record |
| 99 | 99 | * @param array $result External variable to store dabatase request results collection |
| 100 | - * @param integer|bool $rType Amount of arguments passed to parent function |
|
| 100 | + * @param integer $rType Amount of arguments passed to parent function |
|
| 101 | 101 | * @param integer $limit Quantity of records to return |
| 102 | 102 | * @param callable $handler External callable handler for results modification |
| 103 | 103 | * @param array $handlerArgs External callable handler arguments |
@@ -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 | { |