Storm\Drivers\Base\Relational\PrimaryKeys\OpenSSLBytesGenerator::FillPrimaryKeys PHP Метод

FillPrimaryKeys() публичный Метод

public FillPrimaryKeys ( Storm\Drivers\Base\Relational\Queries\IConnection $Connection, array $UnkeyedRows )
$Connection Storm\Drivers\Base\Relational\Queries\IConnection
$UnkeyedRows array
    public function FillPrimaryKeys(IConnection $Connection, array $UnkeyedRows)
    {
        $Columns = $this->GetPrimaryKeyColumns();
        $BytesToGenerate = $this->Length * count($UnkeyedRows) * count($Columns);
        $Bytes = openssl_random_pseudo_bytes($BytesToGenerate);
        foreach ($UnkeyedRows as $UnkeyedRow) {
            foreach ($Columns as $Column) {
                $CurrentBytes = substr($Bytes, 0, $this->Length);
                $UnkeyedRow[$Column] = $this->Hexadecimal ? bin2hex($CurrentBytes) : $CurrentBytes;
                $Bytes = substr($Bytes, $this->Length);
            }
        }
    }
OpenSSLBytesGenerator