@param UuidInterface $id
@param string        $name
@param Chips         $minimumBuyIn

@return CashGame
550681
public static function setUp(UuidInterface $id, string $name, Chips $minimumBuyIn)
    {
        return new self($id, $name, $minimumBuyIn);
    }
1163829
public static function batchCreateCoupons($id, $params = null, $options = null)
    {
        $url = static::classUrl() . '/' . $id . '/coupons';
        return static::_directRequest('post', $url, $params, $options);
    }
1241762
public function run($id, $name)
    {
        /** @var \bariew\postAbstractModule\models\Item $model */
        $model = $this->controller->findModel($id);
        if ($model->deleteFile($name)) {
            Yii::$app->session->setFlash('success', Yii::t('app', 'File successfully deleted'));
        } else {
            Yii::$app->session->setFlash('error', Yii::t('app', 'File delete error'));
        }
        return $this->controller->redirect(Yii::$app->request->referrer);
    }
1330529
public function addChips(Chips $chips, Player $player): ChipPot
    {
        $existingChips = $this->chips()->get($player->name()) ?? Chips::zero();

        $this->chips->put($player->name(), Chips::fromAmount($existingChips->amount() + $chips->amount()));

        if ($this->players()->findByName($player->name()) === null) {
            $this->players->push($player);
        }

        return $this;
    }
817812
private static function db(string $name = null) : TransactionDatabase
    {
        list($container, $config, $return) = DI::detect(__METHOD__, 'db', $name);

        if ($return) {
            return $return;
        }

        if (is_string($config)) {
            $key = 'instance_' . md5($config);
        } else {
            $key = 'instance_' . md5(serialize($config));
        }

        if (DI::get(__METHOD__, $key)) {
            return DI::get(__METHOD__, $key);
        }

        $db = AbstractDatabase::create($config);
        DI::set(__METHOD__, $key, $db);

        return DI::set(__METHOD__, $container, $db);
    }
1143282
public function onPurchase($id, array $data)
    {
        $data = $this->resolverFactory->createDevicePurchaseResolver()->resolve($data);

        return $this->api->request('POST', '/players/'.$id.'/on_purchase', [], json_encode($data));
    }
322754
public function findById($className, $id)
    {
        return $this->factory->createTransaction()->findByReference(new Reference($className, $id));
    }
831997
public function sendBlock($id, $data, $name = null)
    {
        $this->send("id: {$id}\n");
        if (strlen($name) && $name !== null) {
            $this->send("event: {$name}\n");
        }
        $this->send($this->wrapData($data)."\n\n");
    }
981772
public function getId(PDO $con, $name = null)
    {
        if ($name === null) {
            throw new PropelException("Unable to fetch next sequence ID without sequence name.");
        }

        $stmt = $con->query("SELECT " . $name . ".nextval FROM dual");
        $row = $stmt->fetch(PDO::FETCH_NUM);

        return $row[0];
    }
808463
public function add($id, $name = null, $qty = null, $price = null, array $options = [])
    {
        if ($this->isMulti($id)) {
            return array_map(function ($item) {
                return $this->add($item);
            }, $id);
        }

        $cartItem = $this->createCartItem($id, $name, $qty, $price, $options);

        $content = $this->getContent();

        if ($content->has($cartItem->rowId)) {
            $cartItem->qty += $content->get($cartItem->rowId)->qty;
        }

        $content->put($cartItem->rowId, $cartItem);
        
        $this->events->fire('cart.added', $cartItem);

        $this->session->put($this->instance, $content);

        return $cartItem;
    }
565525
public function update($id, $name)
    {
        $image = $this->adapter->put(sprintf('%s/images/%d', $this->endpoint, $id), ['name' => $name]);

        $image = json_decode($image);

        return new ImageEntity($image->image);
    }
224053
public function move_bit(string $id, string $id_parent = null): ?bool
  { 
    if ( 
      \bbn\str::is_uid($id) && 
      (
        (\bbn\str::is_uid($id_parent) && $this->get_bit($id_parent)) || 
        \is_null($id_parent)
      ) &&
      ($bit = $this->get_bit($id)) &&
      ($cf = $this->get_class_cfg()) &&
      ($cfg =  $cf['arch']['user_options_bits'])
    ){
      $upd = [
        $cfg['id_parent'] => $id_parent,
        $cfg['num'] => $this->get_max_bit_num($bit[$cfg['id_user_option']], $id_parent, true)
      ];
      return !!$this->db->update($cf['tables']['user_options_bits'], $upd, [$cfg['id'] => $id]);
    }
    return null;
  }
1195804
public function clone(string $id, string $name): ?string
  {
    if ( \bbn\str::is_uid($id) && ($id_menu = $this->add(['text' => $name])) ){
      if ( ($bits = $this->pref->get_full_bits($id)) && !$this->_clone($id_menu, $bits) ){
        return null;
      }
      return $id_menu;
    }
    return null;
  }
679695
public static function invalidId($message = null)
    {
        $defaultMessage = 'ID passed to the Game must be a valid UUID';
        $message = is_null($message) ? $defaultMessage : $message;

        return new static($message);
    }
1135265
public function loadTransaction($id)
    {
        $transaction = CActiveRecord::model($this->transactionClass)->findByPk($id);
        if ($transaction === null) {
            throw new CException(sprintf('Failed to load payment transaction #%d.', $id));
        }
        return $transaction;
    }
588713
public function lastInsertId($name)
    {
        // check if a valid name and sequence exists
        if (! $name || ! $this->exists($name)) {
            return 0;
        }

        return $this->connection->selectOne("select {$name}.currval as id from dual")->id;
    }
597409
public function updateTags($id, $name)
    {
        $url = "https://api.weixin.qq.com/cgi-bin/tags/update?access_token=ACCESS_TOKEN";
        $this->registerApi($url, __FUNCTION__, func_get_args());
        return $this->httpPostForJson($url, ['tag' => ['name' => $name, 'id' => $id]]);
    }