.two div[id]~div:nth-of-type(2)
читается как:class API
{
public function getProduct(int $productId): Product
{
$product = $this->request(...); // Получение данных из API
return Product::from($product)
{
}
class Product
{
private int $id;
private string $title;
// прочие свойства
public function getId(): int
{
return $this->id;
}
public function getTitle(): int
{
return $this->title;
}
// прочие геттеры
// сеттеры, если нужны
public static function from(object $source): self
{
$product = new static();
$product->id = $source->id;
$product->title = $source->title;
// заполнение свойств
return $product;
}
}
...
$api = new API($login, $password);
$product = $api->getProduct(325);
$ man killall
...
killall sends a signal to all processes running any of the specified commands. If no signal
name is specified, SIGTERM is sent.
...
-w, --wait
Wait for all killed processes to die. killall checks once per second if any
of the killed processes still exist and only returns if none are left. Note
that killall may wait forever if the signal was ignored, had no effect, or if
the process stays in zombie state.
SELECT `ebids`.*, IFNULL(`c`.`qqq`, 0) AS `has_qqq_comment`,
IFNULL(`c`.`www`, 0) AS `has_www_comment`, IFNULL(`c`.`eee`, 0) AS `has_eee_comment`
FROM `ebids`
LEFT JOIN (
SELECT `item_id`, SUM(`itemtype` = 'qqq') AS 'qqq',
SUM(`itemtype` = 'www') AS 'www', SUM(`itemtype` = 'eee') AS 'eee'
FROM `comment_system`
GROUP BY `item_id`
) AS `c` ON `c`.`item_id` = `ebids`.`id`
WHERE `ebids`.`status` != 'auto'
ORDER BY `ebids`.`id` DESC
LIMIT 0, 100
Movie.belongsToMany(Director, { through: 'Movie_Director' });
Director.belongsToMany(Movie, { through: 'Movie_Director' });
$foo = ['order' => '100668327'];
echo $foo['order'];
или$foo = (object)['order' => '100668327'];
echo $foo->order;
$foo = json_decode('{"order":"100668327"}');
echo $foo->order;
или$foo = json_decode('{"order":"100668327"}', true);
echo $foo['order'];