summaryrefslogtreecommitdiffstats
path: root/vendor/gipfl/zfdbstore/src/DbStorableInterface.php
blob: ba9a49f947ff9b739c1aa079edb0b2ba0e964059 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
<?php

namespace gipfl\ZfDbStore;

interface DbStorableInterface extends StorableInterface
{
    /**
     * The table where this Storable will be loaded from and stored to
     *
     * @return string
     */
    public function getTableName();

    /**
     * Whether this Storable has an auto-incrementing key column
     * @return bool
     */
    public function hasAutoIncKey();

    /**
     * Returns the name of the auto-incrementing key column
     *
     * @return string
     */
    public function getAutoIncKeyName();

    /**
     * Get the AutoInc value if set
     *
     * Should throw and Exception in case no such key has been defined. This
     * will return null for unstored DbStorables
     *
     * @return int|null
     */
    public function getAutoIncId();
}