Subversion Repositories Applications.gtt

Rev

Rev 94 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 94 Rev 187
Line 2... Line 2...
2
/**
2
/**
3
 * PEAR_ChannelFile_Parser for parsing channel.xml
3
 * PEAR_ChannelFile_Parser for parsing channel.xml
4
 *
4
 *
5
 * PHP versions 4 and 5
5
 * PHP versions 4 and 5
6
 *
6
 *
7
 * LICENSE: This source file is subject to version 3.0 of the PHP license
-
 
8
 * that is available through the world-wide-web at the following URI:
-
 
9
 * http://www.php.net/license/3_0.txt.  If you did not receive a copy of
-
 
10
 * the PHP License and are unable to obtain it through the web, please
-
 
11
 * send a note to license@php.net so we can mail you a copy immediately.
-
 
12
 *
-
 
13
 * @category   pear
7
 * @category   pear
14
 * @package    PEAR
8
 * @package    PEAR
15
 * @author     Greg Beaver <cellog@php.net>
9
 * @author     Greg Beaver <cellog@php.net>
16
 * @copyright  1997-2006 The PHP Group
10
 * @copyright  1997-2009 The Authors
17
 * @license    http://www.php.net/license/3_0.txt  PHP License 3.0
11
 * @license    http://opensource.org/licenses/bsd-license.php New BSD License
18
 * @version    CVS: $Id: Parser.php,v 1.4 2006/01/06 04:47:36 cellog Exp $
-
 
19
 * @link       http://pear.php.net/package/PEAR
12
 * @link       http://pear.php.net/package/PEAR
20
 * @since      File available since Release 1.4.0a1
13
 * @since      File available since Release 1.4.0a1
21
 */
14
 */
Line 22... Line 15...
22
 
15
 
Line 28... Line 21...
28
/**
21
/**
29
 * Parser for channel.xml
22
 * Parser for channel.xml
30
 * @category   pear
23
 * @category   pear
31
 * @package    PEAR
24
 * @package    PEAR
32
 * @author     Greg Beaver <cellog@php.net>
25
 * @author     Greg Beaver <cellog@php.net>
33
 * @copyright  1997-2006 The PHP Group
26
 * @copyright  1997-2009 The Authors
34
 * @license    http://www.php.net/license/3_0.txt  PHP License 3.0
27
 * @license    http://opensource.org/licenses/bsd-license.php New BSD License
35
 * @version    Release: 1.5.1
28
 * @version    Release: 1.10.1
36
 * @link       http://pear.php.net/package/PEAR
29
 * @link       http://pear.php.net/package/PEAR
37
 * @since      Class available since Release 1.4.0a1
30
 * @since      Class available since Release 1.4.0a1
38
 */
31
 */
39
class PEAR_ChannelFile_Parser extends PEAR_XMLParser
32
class PEAR_ChannelFile_Parser extends PEAR_XMLParser
40
{
33
{
Line 56... Line 49...
56
    function parse($data, $file)
49
    function parse($data, $file)
57
    {
50
    {
58
        if (PEAR::isError($err = parent::parse($data, $file))) {
51
        if (PEAR::isError($err = parent::parse($data, $file))) {
59
            return $err;
52
            return $err;
60
        }
53
        }
-
 
54
 
61
        $ret = new PEAR_ChannelFile;
55
        $ret = new PEAR_ChannelFile;
62
        $ret->setConfig($this->_config);
56
        $ret->setConfig($this->_config);
63
        if (isset($this->_logger)) {
57
        if (isset($this->_logger)) {
64
            $ret->setLogger($this->_logger);
58
            $ret->setLogger($this->_logger);
65
        }
59
        }
-
 
60
 
66
        $ret->fromArray($this->_unserializedData);
61
        $ret->fromArray($this->_unserializedData);
67
        // make sure the filelist is in the easy to read format needed
62
        // make sure the filelist is in the easy to read format needed
68
        $ret->flattenFilelist();
63
        $ret->flattenFilelist();
69
        $ret->setPackagefile($file, $archive);
64
        $ret->setPackagefile($file, $archive);
70
        return $ret;
65
        return $ret;
71
    }
66
    }
72
}
-
 
73
?>
-
 
74
67
}
-
 
68
75
69