Skip to content

Commit 465dd39

Browse files
committed
Add LoggableInterface
1 parent 5914efc commit 465dd39

File tree

3 files changed

+37
-2
lines changed

3 files changed

+37
-2
lines changed

src/Onion/LoggableInterface.php

+18
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
<?php
2+
/*
3+
* This file is part of the Onion package.
4+
*
5+
* (c) Yo-An Lin <[email protected]>
6+
*
7+
* For the full copyright and license information, please view the LICENSE
8+
* file that was distributed with this source code.
9+
*
10+
*/
11+
namespace Onion;
12+
13+
interface LoggableInterface
14+
{
15+
function setLogger( \CLIFramework\Logger $logger );
16+
function getLogger();
17+
}
18+

src/Onion/PackageConfigReader.php

+6-2
Original file line numberDiff line numberDiff line change
@@ -21,15 +21,19 @@
2121
*
2222
* package ini file reader:
2323
*
24-
* $reader = new PackageIniReader;
24+
* $reader = new PackageIniReader();
25+
* $reader->setLogger( $logger );
2526
* $pkginfo = $reader->read( 'file.ini' );
2627
*
2728
* $pkginfo->get( 'config' );
2829
* $pkginfo->get( 'config.name' );
2930
* $pkginfo->get( 'section.name' );
3031
*
3132
* $pkgxml = new PackageXmlGenerator( $pkginfo );
32-
* $pkgxml->generate();
33+
* $pkgxml->setLogger( $logger );
34+
* $pkgxml->useDefaultOptions(true);
35+
* $pkgxml->setReformat(true);
36+
* $pkgxml->generate('package.xml');
3337
*
3438
*/
3539
class PackageConfigReader

src/Onion/PackageIniReader.php

+13
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
<?php
2+
/*
3+
* This file is part of the Onion package.
4+
*
5+
* (c) Yo-An Lin <[email protected]>
6+
*
7+
* For the full copyright and license information, please view the LICENSE
8+
* file that was distributed with this source code.
9+
*
10+
*/
11+
namespace Onion;
12+
13+

0 commit comments

Comments
 (0)