Completed
Pull Request — master (#4)
by
unknown
09:38 queued 20s
created

PhiberPersistenceFactory   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 56
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Importance

Changes 0
Metric Value
wmc 1
lcom 0
cbo 0
dl 0
loc 56
rs 10
c 0
b 0
f 0

6 Methods

Rating   Name   Duplication   Size   Complexity  
A getConnection() 0 6 1
create() 0 1 ?
update() 0 1 ?
delete() 0 1 ?
rowCount() 0 1 ?
select() 0 1 ?
1
<?php
2
3
/**
4
 * Copyright (c) 2017. Este código foi feito por @marciioluucas, sob licença MIT
5
 */
6
namespace Phiber\ORM\Factories;
7
8
use PDO;
9
use Phiber\Link;
10
11
/**
12
 * Interface IPhiberPersistence
13
 * @package bin
14
 */
15
abstract class PhiberPersistenceFactory
16
{
17
    /**
18
     * Pega a conexão com o banco
19
     * 
20
     * @return PDO
21
     */
22
    public function getConnection()
23
    {
24
        $pdo = new Link();
25
    
26
        return $pdo->getConnection();
27
    }
28
29
    /**
30
     * Faz a criação do objeto no banco
31
     * 
32
     * @return mixed
33
     */
34
    public abstract function create();
0 ignored issues
show
Coding Style introduced by
The abstract declaration must precede the visibility declaration
Loading history...
35
36
    /**
37
     * Faz a alteração do objeto no banco
38
     * 
39
     * @param  $infos
40
     * @return mixed
41
     * @internal param $id
42
     */
43
    public abstract function update();
0 ignored issues
show
Coding Style introduced by
The abstract declaration must precede the visibility declaration
Loading history...
44
45
    /**
46
     * Faz a exclusão do objeto no banco
47
     * 
48
     * @param $infos
49
     * @return mixed
50
     */
51
    public abstract function delete();
0 ignored issues
show
Coding Style introduced by
The abstract declaration must precede the visibility declaration
Loading history...
52
53
    /**
54
     * Faz a contagem de quantos objetos está no banco
55
     * 
56
     * @param $infos
57
     * @return mixed
58
     * @internal param array $condicoes
59
     * @internal param array $conjuncoes
60
     */
61
    public abstract function rowCount();
0 ignored issues
show
Coding Style introduced by
The abstract declaration must precede the visibility declaration
Loading history...
62
63
    /**
64
     * Faz a seleção dos objetos no banco
65
     * 
66
     * @param $infos
67
     * @return mixed
68
     */
69
    public abstract function select();
0 ignored issues
show
Coding Style introduced by
The abstract declaration must precede the visibility declaration
Loading history...
70
}
71