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
 * BuildException + exit status.
22
 *
23
 * @author  Siad Ardroumli <siad.ardroumli@gmail.com>
24
 * @package phing
25
 */
26
class ExitStatusException extends BuildException
27
{
28
    /**
29
     * Status code
30
     */
31
    protected $code;
32

33
    /**
34
     * Constructs an <code>ExitStatusException</code>.
35
     *
36
     * @param null|int|string $arg1
37
     * @param int $arg2
38
     * @param Location $arg3
39
     */
40 0
    public function __construct($arg1 = null, $arg2 = 0, Location $arg3 = null)
41
    {
42 0
        $methodArgsNum = func_num_args();
43 0
        if ($methodArgsNum === 1) {
44 0
            parent::__construct();
45 0
            $this->code = (int) $arg1;
46 0
        } elseif ($methodArgsNum === 2 && is_string($arg1) && is_int($arg2)) {
47 0
            parent::__construct($arg1);
48 0
            $this->code = $arg2;
49 0
        } elseif ($methodArgsNum === 3 && is_string($arg1) && is_int($arg2)) {
50 0
            parent::__construct($arg1, $arg3);
51 0
            $this->code = $arg2;
52
        }
53
    }
54
}

Read our documentation on viewing source code .

Loading