# SWDB

# \Run

A run.

Represents an object from the table 'run'.

## Summary

Methods
Properties
Constants
__construct()
$db
$uid
$id
$dtime
$area
$stage
$difficulty
$win
$time
$mana
$energy
$crystal
$helper
$party
$item
$unit
$sd
$unit_piece
$shapeshifting
$rune
No constants found
No protected methods found
No protected properties found
N/A
No private methods found
No private properties found
N/A

File
  application/entity/Run.php
Package
  Default
Class hierarchy
  \Entity
  \Run

## Tags

category | Entity

## Properties

### $db

    $db : resource

#### Type

resource — Database connection.

#

Inherited from
  \Entity

## Tags

None found

### $uid

    $uid : integer

#### Type

integer — Player identifier.

#

## Tags

None found

### $id

    $id : integer

#### Type

integer — Run identifier.

#

## Tags

None found

### $dtime

    $dtime : \DateTime

#### Type

\DateTime — Run start datestamp.

#

## Tags

None found

### $area

    $area : \K_Area

#### Type

\K_Area — Area.

#

## Tags

None found

### $stage

    $stage : integer

#### Type

integer — Stage.

#

## Tags

None found

### $difficulty

    $difficulty : integer

#### Type

integer — Difficulty (only scenario and dimension hole)

#

## Tags

None found

### $win

    $win : boolean

#### Type

boolean — Win or lost run.

#

## Tags

None found

### $time

    $time : integer

#### Type

integer — Clear time, milliseconds.

#

## Tags

None found

### $mana

    $mana : integer

#### Type

integer — Reward mana.

#

## Tags

None found

### $energy

    $energy : integer

#### Type

integer — Reward energy.

#

## Tags

None found

### $crystal

    $crystal : integer

#### Type

integer — Reward crystal.

#

## Tags

None found

### $helper

    $helper : boolean

#### Type

boolean — Indicates if a frind/mentor helped.

#

## Tags

None found

### $party

    $party : array<mixed,\Unit>|array<mixed,\K_Unit>

#### Type

array<mixed,\Unit>|array<mixed,\K_Unit> — Uits used. If the unit is still owned, it will be a instance of Unit. If not, it will be a instance of K_Unit.

#

## Tags

None found

### $item

    $item : array<mixed,\Inventory>

#### Type

array<mixed,\Inventory> — Dropped items.

#

## Tags

None found

### $unit

    $unit : array<mixed,\K_Unit>

#### Type

array<mixed,\K_Unit> — Units dropped.

#

## Tags

None found

### $sd

    $sd : integer

#### Type

integer — K_Unit[] Units whose secret dungeons were found on the run.

#

## Tags

None found

### $unit_piece

    $unit_piece : array<mixed,mixed>

#### Type

array<mixed,mixed> — List of dropped summon pieces. Formated as: [@{see K_Unit}, amount]

#

## Tags

None found

### $shapeshifting

    $shapeshifting : integer

#### Type

integer — Number of shapeshifting stones dropped;

#

## Tags

None found

### $rune

    $rune : array<mixed,\Rune>

#### Type

array<mixed,\Rune> — List of Runes dropped.

#

## Tags

None found

## Methods

### __construct()

    __construct(resource  $db, integer  $id)

Constructor.

Searches the database and retrieves the information about the run, populating it and it's items.

#### Parameters

resource | $db | Connection to the database.
integer | $id | Run identifier.

#

## Tags

None found

### Run.php