Navigation | Overlay |
---|---|
t Navigate files | h Toggle hits |
y Change url to tip of branch | m Toggle misses |
b / v Jump to prev/next hit line | p Toggle partial |
z / x Jump to prev/next missed or partial line | 1..9 Toggle flags |
shift + o Open current page in GitHub | a Toggle all on |
/ or ? Show keyboard shortcuts dialog | c Toggle context lines or commits |
1 |
<?php
|
|
2 |
/**
|
|
3 |
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
|
4 |
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
|
5 |
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
|
6 |
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
|
7 |
* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
|
8 |
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
|
9 |
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
|
10 |
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
|
11 |
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
|
12 |
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
|
13 |
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
14 |
*
|
|
15 |
* This software consists of voluntary contributions made by many individuals
|
|
16 |
* and is licensed under the LGPL. For more information please see
|
|
17 |
* <http://phing.info>.
|
|
18 |
*/
|
|
19 |
|
|
20 |
/**
|
|
21 |
* @author Michiel Rook <mrook@php.net>
|
|
22 |
* @package phing.tasks.ext.phploc
|
|
23 |
*/
|
|
24 |
class PHPLocFormatterElement |
|
25 |
{
|
|
26 |
/**
|
|
27 |
* @var string
|
|
28 |
*/
|
|
29 |
protected $type = ""; |
|
30 |
|
|
31 |
/**
|
|
32 |
* @var bool
|
|
33 |
*/
|
|
34 |
protected $useFile = true; |
|
35 |
|
|
36 |
/**
|
|
37 |
* @var string
|
|
38 |
*/
|
|
39 |
protected $toDir = "."; |
|
40 |
|
|
41 |
/**
|
|
42 |
* @var string
|
|
43 |
*/
|
|
44 |
protected $outfile = "phploc-report"; |
|
45 |
|
|
46 |
/**
|
|
47 |
* Loads a specific formatter type
|
|
48 |
*
|
|
49 |
* @param string $type
|
|
50 |
*/
|
|
51 |
public function setType($type) |
|
52 |
{
|
|
53 |
$this->type = $type; |
|
54 |
}
|
|
55 |
|
|
56 |
/**
|
|
57 |
* @return string
|
|
58 |
*/
|
|
59 |
public function getType() |
|
60 |
{
|
|
61 |
return $this->type; |
|
62 |
}
|
|
63 |
|
|
64 |
/**
|
|
65 |
* Sets whether to store formatting results in a file
|
|
66 |
*
|
|
67 |
* @param $useFile
|
|
68 |
*/
|
|
69 |
public function setUseFile($useFile) |
|
70 |
{
|
|
71 |
$this->useFile = $useFile; |
|
72 |
}
|
|
73 |
|
|
74 |
/**
|
|
75 |
* Returns whether to store formatting results in a file
|
|
76 |
*/
|
|
77 |
public function getUseFile() |
|
78 |
{
|
|
79 |
return $this->useFile; |
|
80 |
}
|
|
81 |
|
|
82 |
/**
|
|
83 |
* Sets output directory
|
|
84 |
*
|
|
85 |
* @param string $toDir
|
|
86 |
*/
|
|
87 |
public function setToDir($toDir) |
|
88 |
{
|
|
89 |
$this->toDir = $toDir; |
|
90 |
}
|
|
91 |
|
|
92 |
/**
|
|
93 |
* Returns output directory
|
|
94 |
*
|
|
95 |
* @return string
|
|
96 |
*/
|
|
97 |
public function getToDir() |
|
98 |
{
|
|
99 |
return $this->toDir; |
|
100 |
}
|
|
101 |
|
|
102 |
/**
|
|
103 |
* Sets output filename
|
|
104 |
*
|
|
105 |
* @param string $outfile
|
|
106 |
*/
|
|
107 |
public function setOutfile($outfile) |
|
108 |
{
|
|
109 |
$this->outfile = $outfile; |
|
110 |
}
|
|
111 |
|
|
112 |
/**
|
|
113 |
* Returns output filename
|
|
114 |
*
|
|
115 |
* @return string
|
|
116 |
*/
|
|
117 |
public function getOutfile() |
|
118 |
{
|
|
119 |
return $this->outfile; |
|
120 |
}
|
|
121 |
}
|
Read our documentation on viewing source code .