Skip to content
Browse files

* Finalized the build file including adding a new target for building…

… plugin packages

* Added a custom phing task file used for building Phergie core and plugin packages
* Moved all non-code files out of the main Phergie directory
* Changed instances of @package Phergie_Core to @package Phergie in docblocks
* Added @uses tags to plugin classes for dependencies, which are used when building plugin packages
* Moved Bootstrap.php to phergie.php outside the main Phergie directory (which will become a phergie executable when installed)
* Added a phergie.bat runner for Windows
  • Loading branch information...
1 parent f9153f2 commit 4e625edbde421db7825f36e96438f52992e1d22d Matthew Turland committed Feb 6, 2010
Showing with 523 additions and 296 deletions.
  1. 0 {Phergie → }/LICENSE
  2. +4 −4 Phergie/Autoload.php
  3. +4 −4 Phergie/Bot.php
  4. +4 −4 Phergie/Config.php
  5. +4 −4 Phergie/Config/Exception.php
  6. +4 −4 Phergie/Connection.php
  7. +4 −4 Phergie/Connection/Exception.php
  8. +4 −4 Phergie/Connection/Handler.php
  9. +4 −4 Phergie/Driver/Abstract.php
  10. +4 −4 Phergie/Driver/Exception.php
  11. +4 −4 Phergie/Driver/Streams.php
  12. +4 −4 Phergie/Event/Abstract.php
  13. +4 −4 Phergie/Event/Command.php
  14. +4 −4 Phergie/Event/Exception.php
  15. +4 −4 Phergie/Event/Handler.php
  16. +4 −4 Phergie/Event/Request.php
  17. +4 −4 Phergie/Event/Response.php
  18. +4 −4 Phergie/Exception.php
  19. +4 −4 Phergie/Hostmask.php
  20. +4 −4 Phergie/Hostmask/Exception.php
  21. +4 −4 Phergie/Plugin/Abstract.php
  22. +5 −4 Phergie/Plugin/AltNick.php
  23. +4 −4 Phergie/Plugin/AutoJoin.php
  24. +5 −4 Phergie/Plugin/Command.php
  25. +4 −4 Phergie/Plugin/Ctcp.php
  26. +4 −4 Phergie/Plugin/Exception.php
  27. +4 −4 Phergie/Plugin/Handler.php
  28. +1 −1 Phergie/Plugin/Invisible.php
  29. +1 −0 Phergie/Plugin/Join.php
  30. +1 −0 Phergie/Plugin/Part.php
  31. +3 −0 Phergie/Plugin/Php.php
  32. +4 −4 Phergie/Plugin/Ping.php
  33. +4 −4 Phergie/Plugin/Pong.php
  34. +4 −4 Phergie/Plugin/Prioritize.php
  35. +1 −0 Phergie/Plugin/Puppet.php
  36. +5 −4 Phergie/Plugin/Quit.php
  37. +1 −0 Phergie/Plugin/TerryChay.php
  38. +4 −4 Phergie/Plugin/Url.php
  39. +0 −44 Phergie/Settings.php.dist
  40. +4 −4 Phergie/Ui/Abstract.php
  41. +4 −4 Phergie/Ui/Console.php
  42. +0 −117 Phergie/build.xml
  43. +83 −0 PhergiePackageTask.php
  44. +33 −0 Settings.php.dist
  45. +238 −0 build.xml
  46. +14 −0 phergie.bat
  47. +12 −2 Phergie/Bootstrap.php → phergie.php
View
0 Phergie/LICENSE → LICENSE
File renamed without changes.
View
8 Phergie/Autoload.php
@@ -12,21 +12,21 @@
* http://phergie.org/license
*
* @category Phergie
- * @package Phergie_Core
+ * @package Phergie
* @author Phergie Development Team <team@phergie.org>
* @copyright 2008-2010 Phergie Development Team (http://phergie.org)
* @license http://phergie.org/license New BSD License
- * @link http://pear.phergie.org/package/Phergie_Core
+ * @link http://pear.phergie.org/package/Phergie
*/
/**
* Autoloader for Phergie classes.
*
* @category Phergie
- * @package Phergie_Core
+ * @package Phergie
* @author Phergie Development Team <team@phergie.org>
* @license http://phergie.org/license New BSD License
- * @link http://pear.phergie.org/package/Phergie_Core
+ * @link http://pear.phergie.org/package/Phergie
*/
class Phergie_Autoload
{
View
8 Phergie/Bot.php
@@ -12,21 +12,21 @@
* http://phergie.org/license
*
* @category Phergie
- * @package Phergie_Core
+ * @package Phergie
* @author Phergie Development Team <team@phergie.org>
* @copyright 2008-2010 Phergie Development Team (http://phergie.org)
* @license http://phergie.org/license New BSD License
- * @link http://pear.phergie.org/package/Phergie_Core
+ * @link http://pear.phergie.org/package/Phergie
*/
/**
* Composite class for other components to represent the bot.
*
* @category Phergie
- * @package Phergie_Core
+ * @package Phergie
* @author Phergie Development Team <team@phergie.org>
* @license http://phergie.org/license New BSD License
- * @link http://pear.phergie.org/package/Phergie_Core
+ * @link http://pear.phergie.org/package/Phergie
*/
class Phergie_Bot
{
View
8 Phergie/Config.php
@@ -12,22 +12,22 @@
* http://phergie.org/license
*
* @category Phergie
- * @package Phergie_Core
+ * @package Phergie
* @author Phergie Development Team <team@phergie.org>
* @copyright 2008-2010 Phergie Development Team (http://phergie.org)
* @license http://phergie.org/license New BSD License
- * @link http://pear.phergie.org/package/Phergie_Core
+ * @link http://pear.phergie.org/package/Phergie
*/
/**
* Reads from and writes to PHP configuration files and provides access to
* the settings they contain.
*
* @category Phergie
- * @package Phergie_Core
+ * @package Phergie
* @author Phergie Development Team <team@phergie.org>
* @license http://phergie.org/license New BSD License
- * @link http://pear.phergie.org/package/Phergie_Core
+ * @link http://pear.phergie.org/package/Phergie
*/
class Phergie_Config implements ArrayAccess
{
View
8 Phergie/Config/Exception.php
@@ -12,21 +12,21 @@
* http://phergie.org/license
*
* @category Phergie
- * @package Phergie_Core
+ * @package Phergie
* @author Phergie Development Team <team@phergie.org>
* @copyright 2008-2010 Phergie Development Team (http://phergie.org)
* @license http://phergie.org/license New BSD License
- * @link http://pear.phergie.org/package/Phergie_Core
+ * @link http://pear.phergie.org/package/Phergie
*/
/**
* Exception related to configuration.
*
* @category Phergie
- * @package Phergie_Core
+ * @package Phergie
* @author Phergie Development Team <team@phergie.org>
* @license http://phergie.org/license New BSD License
- * @link http://pear.phergie.org/package/Phergie_Core
+ * @link http://pear.phergie.org/package/Phergie
*/
class Phergie_Config_Exception extends Phergie_Exception
{
View
8 Phergie/Connection.php
@@ -12,21 +12,21 @@
* http://phergie.org/license
*
* @category Phergie
- * @package Phergie_Core
+ * @package Phergie
* @author Phergie Development Team <team@phergie.org>
* @copyright 2008-2010 Phergie Development Team (http://phergie.org)
* @license http://phergie.org/license New BSD License
- * @link http://pear.phergie.org/package/Phergie_Core
+ * @link http://pear.phergie.org/package/Phergie
*/
/**
* Data structure for connection metadata.
*
* @category Phergie
- * @package Phergie_Core
+ * @package Phergie
* @author Phergie Development Team <team@phergie.org>
* @license http://phergie.org/license New BSD License
- * @link http://pear.phergie.org/package/Phergie_Core
+ * @link http://pear.phergie.org/package/Phergie
*/
class Phergie_Connection
{
View
8 Phergie/Connection/Exception.php
@@ -12,21 +12,21 @@
* http://phergie.org/license
*
* @category Phergie
- * @package Phergie_Core
+ * @package Phergie
* @author Phergie Development Team <team@phergie.org>
* @copyright 2008-2010 Phergie Development Team (http://phergie.org)
* @license http://phergie.org/license New BSD License
- * @link http://pear.phergie.org/package/Phergie_Core
+ * @link http://pear.phergie.org/package/Phergie
*/
/**
* Exception related to a connection to an IRC server.
*
* @category Phergie
- * @package Phergie_Core
+ * @package Phergie
* @author Phergie Development Team <team@phergie.org>
* @license http://phergie.org/license New BSD License
- * @link http://pear.phergie.org/package/Phergie_Core
+ * @link http://pear.phergie.org/package/Phergie
*/
class Phergie_Connection_Exception extends Phergie_Exception
{
View
8 Phergie/Connection/Handler.php
@@ -12,21 +12,21 @@
* http://phergie.org/license
*
* @category Phergie
- * @package Phergie_Core
+ * @package Phergie
* @author Phergie Development Team <team@phergie.org>
* @copyright 2008-2010 Phergie Development Team (http://phergie.org)
* @license http://phergie.org/license New BSD License
- * @link http://pear.phergie.org/package/Phergie_Core
+ * @link http://pear.phergie.org/package/Phergie
*/
/**
* Handles connections initiated by the bot.
*
* @category Phergie
- * @package Phergie_Core
+ * @package Phergie
* @author Phergie Development Team <team@phergie.org>
* @license http://phergie.org/license New BSD License
- * @link http://pear.phergie.org/package/Phergie_Core
+ * @link http://pear.phergie.org/package/Phergie
*/
class Phergie_Connection_Handler implements Countable, IteratorAggregate
{
View
8 Phergie/Driver/Abstract.php
@@ -12,22 +12,22 @@
* http://phergie.org/license
*
* @category Phergie
- * @package Phergie_Core
+ * @package Phergie
* @author Phergie Development Team <team@phergie.org>
* @copyright 2008-2010 Phergie Development Team (http://phergie.org)
* @license http://phergie.org/license New BSD License
- * @link http://pear.phergie.org/package/Phergie_Core
+ * @link http://pear.phergie.org/package/Phergie
*/
/**
* Base class for drivers which handle issuing client commands to the IRC
* server and converting responses into usable data objects.
*
* @category Phergie
- * @package Phergie_Core
+ * @package Phergie
* @author Phergie Development Team <team@phergie.org>
* @license http://phergie.org/license New BSD License
- * @link http://pear.phergie.org/package/Phergie_Core
+ * @link http://pear.phergie.org/package/Phergie
*/
abstract class Phergie_Driver_Abstract
{
View
8 Phergie/Driver/Exception.php
@@ -12,21 +12,21 @@
* http://phergie.org/license
*
* @category Phergie
- * @package Phergie_Core
+ * @package Phergie
* @author Phergie Development Team <team@phergie.org>
* @copyright 2008-2010 Phergie Development Team (http://phergie.org)
* @license http://phergie.org/license New BSD License
- * @link http://pear.phergie.org/package/Phergie_Core
+ * @link http://pear.phergie.org/package/Phergie
*/
/**
* Exception related to driver operations.
*
* @category Phergie
- * @package Phergie_Core
+ * @package Phergie
* @author Phergie Development Team <team@phergie.org>
* @license http://phergie.org/license New BSD License
- * @link http://pear.phergie.org/package/Phergie_Core
+ * @link http://pear.phergie.org/package/Phergie
*/
class Phergie_Driver_Exception extends Phergie_Exception
{
View
8 Phergie/Driver/Streams.php
@@ -12,11 +12,11 @@
* http://phergie.org/license
*
* @category Phergie
- * @package Phergie_Core
+ * @package Phergie
* @author Phergie Development Team <team@phergie.org>
* @copyright 2008-2010 Phergie Development Team (http://phergie.org)
* @license http://phergie.org/license New BSD License
- * @link http://pear.phergie.org/package/Phergie_Core
+ * @link http://pear.phergie.org/package/Phergie
*/
/**
@@ -25,10 +25,10 @@
* events using PHP.
*
* @category Phergie
- * @package Phergie_Core
+ * @package Phergie
* @author Phergie Development Team <team@phergie.org>
* @license http://phergie.org/license New BSD License
- * @link http://pear.phergie.org/package/Phergie_Core
+ * @link http://pear.phergie.org/package/Phergie
*/
class Phergie_Driver_Streams extends Phergie_Driver_Abstract
{
View
8 Phergie/Event/Abstract.php
@@ -12,21 +12,21 @@
* http://phergie.org/license
*
* @category Phergie
- * @package Phergie_Core
+ * @package Phergie
* @author Phergie Development Team <team@phergie.org>
* @copyright 2008-2010 Phergie Development Team (http://phergie.org)
* @license http://phergie.org/license New BSD License
- * @link http://pear.phergie.org/package/Phergie_Core
+ * @link http://pear.phergie.org/package/Phergie
*/
/**
* Base class for events.
*
* @category Phergie
- * @package Phergie_Core
+ * @package Phergie
* @author Phergie Development Team <team@phergie.org>
* @license http://phergie.org/license New BSD License
- * @link http://pear.phergie.org/package/Phergie_Core
+ * @link http://pear.phergie.org/package/Phergie
*/
abstract class Phergie_Event_Abstract
{
View
8 Phergie/Event/Command.php
@@ -12,21 +12,21 @@
* http://phergie.org/license
*
* @category Phergie
- * @package Phergie_Core
+ * @package Phergie
* @author Phergie Development Team <team@phergie.org>
* @copyright 2008-2010 Phergie Development Team (http://phergie.org)
* @license http://phergie.org/license New BSD License
- * @link http://pear.phergie.org/package/Phergie_Core
+ * @link http://pear.phergie.org/package/Phergie
*/
/**
* Event originating from a plugin for the bot.
*
* @category Phergie
- * @package Phergie_Core
+ * @package Phergie
* @author Phergie Development Team <team@phergie.org>
* @license http://phergie.org/license New BSD License
- * @link http://pear.phergie.org/package/Phergie_Core
+ * @link http://pear.phergie.org/package/Phergie
*/
class Phergie_Event_Command extends Phergie_Event_Request
{
View
8 Phergie/Event/Exception.php
@@ -12,21 +12,21 @@
* http://phergie.org/license
*
* @category Phergie
- * @package Phergie_Core
+ * @package Phergie
* @author Phergie Development Team <team@phergie.org>
* @copyright 2008-2010 Phergie Development Team (http://phergie.org)
* @license http://phergie.org/license New BSD License
- * @link http://pear.phergie.org/package/Phergie_Core
+ * @link http://pear.phergie.org/package/Phergie
*/
/**
* Exception related to outgoing events.
*
* @category Phergie
- * @package Phergie_Core
+ * @package Phergie
* @author Phergie Development Team <team@phergie.org>
* @license http://phergie.org/license New BSD License
- * @link http://pear.phergie.org/package/Phergie_Core
+ * @link http://pear.phergie.org/package/Phergie
*/
class Phergie_Event_Exception extends Phergie_Exception
{
View
8 Phergie/Event/Handler.php
@@ -12,21 +12,21 @@
* http://phergie.org/license
*
* @category Phergie
- * @package Phergie_Core
+ * @package Phergie
* @author Phergie Development Team <team@phergie.org>
* @copyright 2008-2010 Phergie Development Team (http://phergie.org)
* @license http://phergie.org/license New BSD License
- * @link http://pear.phergie.org/package/Phergie_Core
+ * @link http://pear.phergie.org/package/Phergie
*/
/**
* Handles events initiated by plugins.
*
* @category Phergie
- * @package Phergie_Core
+ * @package Phergie
* @author Phergie Development Team <team@phergie.org>
* @license http://phergie.org/license New BSD License
- * @link http://pear.phergie.org/package/Phergie_Core
+ * @link http://pear.phergie.org/package/Phergie
*/
class Phergie_Event_Handler implements IteratorAggregate
{
View
8 Phergie/Event/Request.php
@@ -12,21 +12,21 @@
* http://phergie.org/license
*
* @category Phergie
- * @package Phergie_Core
+ * @package Phergie
* @author Phergie Development Team <team@phergie.org>
* @copyright 2008-2010 Phergie Development Team (http://phergie.org)
* @license http://phergie.org/license New BSD License
- * @link http://pear.phergie.org/package/Phergie_Core
+ * @link http://pear.phergie.org/package/Phergie
*/
/**
* Autonomous event originating from a user or the server.
*
* @category Phergie
- * @package Phergie_Core
+ * @package Phergie
* @author Phergie Development Team <team@phergie.org>
* @license http://phergie.org/license New BSD License
- * @link http://pear.phergie.org/package/Phergie_Core
+ * @link http://pear.phergie.org/package/Phergie
* @see http://www.irchelp.org/irchelp/rfc/chapter4.html
*/
class Phergie_Event_Request
View
8 Phergie/Event/Response.php
@@ -12,22 +12,22 @@
* http://phergie.org/license
*
* @category Phergie
- * @package Phergie_Core
+ * @package Phergie
* @author Phergie Development Team <team@phergie.org>
* @copyright 2008-2010 Phergie Development Team (http://phergie.org)
* @license http://phergie.org/license New BSD License
- * @link http://pear.phergie.org/package/Phergie_Core
+ * @link http://pear.phergie.org/package/Phergie
*/
/**
* Event originating from the server in response to an event sent by the
* current client.
*
* @category Phergie
- * @package Phergie_Core
+ * @package Phergie
* @author Phergie Development Team <team@phergie.org>
* @license http://phergie.org/license New BSD License
- * @link http://pear.phergie.org/package/Phergie_Core
+ * @link http://pear.phergie.org/package/Phergie
* @see http://www.irchelp.org/irchelp/rfc/chapter6.html
*/
class Phergie_Event_Response extends Phergie_Event_Abstract
View
8 Phergie/Exception.php
@@ -12,21 +12,21 @@
* http://phergie.org/license
*
* @category Phergie
- * @package Phergie_Core
+ * @package Phergie
* @author Phergie Development Team <team@phergie.org>
* @copyright 2008-2010 Phergie Development Team (http://phergie.org)
* @license http://phergie.org/license New BSD License
- * @link http://pear.phergie.org/package/Phergie_Core
+ * @link http://pear.phergie.org/package/Phergie
*/
/**
* Base class for all Phergie-related exceptions.
*
* @category Phergie
- * @package Phergie_Core
+ * @package Phergie
* @author Phergie Development Team <team@phergie.org>
* @license http://phergie.org/license New BSD License
- * @link http://pear.phergie.org/package/Phergie_Core
+ * @link http://pear.phergie.org/package/Phergie
*/
class Phergie_Exception extends Exception
{
View
8 Phergie/Hostmask.php
@@ -12,21 +12,21 @@
* http://phergie.org/license
*
* @category Phergie
- * @package Phergie_Core
+ * @package Phergie
* @author Phergie Development Team <team@phergie.org>
* @copyright 2008-2010 Phergie Development Team (http://phergie.org)
* @license http://phergie.org/license New BSD License
- * @link http://pear.phergie.org/package/Phergie_Core
+ * @link http://pear.phergie.org/package/Phergie
*/
/**
* Data structure for a hostmask.
*
* @category Phergie
- * @package Phergie_Core
+ * @package Phergie
* @author Phergie Development Team <team@phergie.org>
* @license http://phergie.org/license New BSD License
- * @link http://pear.phergie.org/package/Phergie_Core
+ * @link http://pear.phergie.org/package/Phergie
*/
class Phergie_Hostmask
{
View
8 Phergie/Hostmask/Exception.php
@@ -12,21 +12,21 @@
* http://phergie.org/license
*
* @category Phergie
- * @package Phergie_Core
+ * @package Phergie
* @author Phergie Development Team <team@phergie.org>
* @copyright 2008-2010 Phergie Development Team (http://phergie.org)
* @license http://phergie.org/license New BSD License
- * @link http://pear.phergie.org/package/Phergie_Core
+ * @link http://pear.phergie.org/package/Phergie
*/
/**
* Exception related to hostmask handling.
*
* @category Phergie
- * @package Phergie_Core
+ * @package Phergie
* @author Phergie Development Team <team@phergie.org>
* @license http://phergie.org/license New BSD License
- * @link http://pear.phergie.org/package/Phergie_Core
+ * @link http://pear.phergie.org/package/Phergie
*/
class Phergie_Hostmask_Exception extends Phergie_Exception
{
View
8 Phergie/Plugin/Abstract.php
@@ -12,22 +12,22 @@
* http://phergie.org/license
*
* @category Phergie
- * @package Phergie_Core
+ * @package Phergie
* @author Phergie Development Team <team@phergie.org>
* @copyright 2008-2010 Phergie Development Team (http://phergie.org)
* @license http://phergie.org/license New BSD License
- * @link http://pear.phergie.org/package/Phergie_Core
+ * @link http://pear.phergie.org/package/Phergie
*/
/**
* Base class for plugins to provide event handler stubs and commonly needed
* functionality.
*
* @category Phergie
- * @package Phergie_Core
+ * @package Phergie
* @author Phergie Development Team <team@phergie.org>
* @license http://phergie.org/license New BSD License
- * @link http://pear.phergie.org/package/Phergie_Core
+ * @link http://pear.phergie.org/package/Phergie
*/
abstract class Phergie_Plugin_Abstract
{
View
9 Phergie/Plugin/AltNick.php
@@ -12,22 +12,23 @@
* http://phergie.org/license
*
* @category Phergie
- * @package Phergie_Core
+ * @package Phergie
* @author Phergie Development Team <team@phergie.org>
* @copyright 2008-2010 Phergie Development Team (http://phergie.org)
* @license http://phergie.org/license New BSD License
- * @link http://pear.phergie.org/package/Phergie_Core
+ * @link http://pear.phergie.org/package/Phergie
*/
/**
* Handles switching to alternate nicks in cases where the primary nick is
* not available for use.
*
* @category Phergie
- * @package Phergie_Core
+ * @package Phergie
* @author Phergie Development Team <team@phergie.org>
* @license http://phergie.org/license New BSD License
- * @link http://pear.phergie.org/package/Phergie_Core
+ * @link http://pear.phergie.org/package/Phergie
+ * @uses extension spl
*/
class Phergie_Plugin_AltNick extends Phergie_Plugin_Abstract
{
View
8 Phergie/Plugin/AutoJoin.php
@@ -12,22 +12,22 @@
* http://phergie.org/license
*
* @category Phergie
- * @package Phergie_Core
+ * @package Phergie
* @author Phergie Development Team <team@phergie.org>
* @copyright 2008-2010 Phergie Development Team (http://phergie.org)
* @license http://phergie.org/license New BSD License
- * @link http://pear.phergie.org/package/Phergie_Core
+ * @link http://pear.phergie.org/package/Phergie
*/
/**
* Automates the process of having the bot join one or more channels upon
* connection to the server.
*
* @category Phergie
- * @package Phergie_Core
+ * @package Phergie
* @author Phergie Development Team <team@phergie.org>
* @license http://phergie.org/license New BSD License
- * @link http://pear.phergie.org/package/Phergie_Core
+ * @link http://pear.phergie.org/package/Phergie
*/
class Phergie_Plugin_AutoJoin extends Phergie_Plugin_Abstract
{
View
9 Phergie/Plugin/Command.php
@@ -12,22 +12,23 @@
* http://phergie.org/license
*
* @category Phergie
- * @package Phergie_Core
+ * @package Phergie
* @author Phergie Development Team <team@phergie.org>
* @copyright 2008-2010 Phergie Development Team (http://phergie.org)
* @license http://phergie.org/license New BSD License
- * @link http://pear.phergie.org/package/Phergie_Core
+ * @link http://pear.phergie.org/package/Phergie
*/
/**
* Handles parsing and execution of commands sent by users via messages sent
* to channels in which the bot is present or directly to the bot.
*
* @category Phergie
- * @package Phergie_Core
+ * @package Phergie
* @author Phergie Development Team <team@phergie.org>
* @license http://phergie.org/license New BSD License
- * @link http://pear.phergie.org/package/Phergie_Core
+ * @link http://pear.phergie.org/package/Phergie
+ * @uses extension reflection
*/
class Phergie_Plugin_Command extends Phergie_Plugin_Abstract
{
View
8 Phergie/Plugin/Ctcp.php
@@ -12,21 +12,21 @@
* http://phergie.org/license
*
* @category Phergie
- * @package Phergie_Core
+ * @package Phergie
* @author Phergie Development Team <team@phergie.org>
* @copyright 2008-2010 Phergie Development Team (http://phergie.org)
* @license http://phergie.org/license New BSD License
- * @link http://pear.phergie.org/package/Phergie_Core
+ * @link http://pear.phergie.org/package/Phergie
*/
/**
* Responds to various CTCP requests sent by the server and users.
*
* @category Phergie
- * @package Phergie_Core
+ * @package Phergie
* @author Phergie Development Team <team@phergie.org>
* @license http://phergie.org/license New BSD License
- * @link http://pear.phergie.org/package/Phergie_Core
+ * @link http://pear.phergie.org/package/Phergie
* @see http://www.irchelp.org/irchelp/rfc/ctcpspec.html
*/
class Phergie_Plugin_Ctcp extends Phergie_Plugin_Abstract
View
8 Phergie/Plugin/Exception.php
@@ -12,21 +12,21 @@
* http://phergie.org/license
*
* @category Phergie
- * @package Phergie_Core
+ * @package Phergie
* @author Phergie Development Team <team@phergie.org>
* @copyright 2008-2010 Phergie Development Team (http://phergie.org)
* @license http://phergie.org/license New BSD License
- * @link http://pear.phergie.org/package/Phergie_Core
+ * @link http://pear.phergie.org/package/Phergie
*/
/**
* Exception related to plugin handling.
*
* @category Phergie
- * @package Phergie_Core
+ * @package Phergie
* @author Phergie Development Team <team@phergie.org>
* @license http://phergie.org/license New BSD License
- * @link http://pear.phergie.org/package/Phergie_Core
+ * @link http://pear.phergie.org/package/Phergie
*/
class Phergie_Plugin_Exception extends Phergie_Exception
{
View
8 Phergie/Plugin/Handler.php
@@ -12,21 +12,21 @@
* http://phergie.org/license
*
* @category Phergie
- * @package Phergie_Core
+ * @package Phergie
* @author Phergie Development Team <team@phergie.org>
* @copyright 2008-2010 Phergie Development Team (http://phergie.org)
* @license http://phergie.org/license New BSD License
- * @link http://pear.phergie.org/package/Phergie_Core
+ * @link http://pear.phergie.org/package/Phergie
*/
/**
* Handles on-demand loading of, iteration over, and access to plugins.
*
* @category Phergie
- * @package Phergie_Core
+ * @package Phergie
* @author Phergie Development Team <team@phergie.org>
* @license http://phergie.org/license New BSD License
- * @link http://pear.phergie.org/package/Phergie_Core
+ * @link http://pear.phergie.org/package/Phergie
*/
class Phergie_Plugin_Handler implements IteratorAggregate
{
View
2 Phergie/Plugin/Invisible.php
@@ -12,7 +12,7 @@
* http://phergie.org/license
*
* @category Phergie
- * @package Phergie_Core
+ * @package Phergie
* @author Phergie Development Team <team@phergie.org>
* @copyright 2008-2010 Phergie Development Team (http://phergie.org)
* @license http://phergie.org/license New BSD License
View
1 Phergie/Plugin/Join.php
@@ -27,6 +27,7 @@
* @author Phergie Development Team <team@phergie.org>
* @license http://phergie.org/license New BSD License
* @link http://pear.phergie.org/package/Phergie_Plugin_Join
+ * @uses Phergie_Plugin_Command pear.phergie.org
*/
class Phergie_Plugin_Join extends Phergie_Plugin_Abstract
{
View
1 Phergie/Plugin/Part.php
@@ -27,6 +27,7 @@
* @author Phergie Development Team <team@phergie.org>
* @license http://phergie.org/license New BSD License
* @link http://pear.phergie.org/package/Phergie_Plugin_Part
+ * @uses Phergie_Plugin_Command pear.phergie.org
*/
class Phergie_Plugin_Part extends Phergie_Plugin_Abstract
{
View
3 Phergie/Plugin/Php.php
@@ -27,6 +27,9 @@
* @author Phergie Development Team <team@phergie.org>
* @license http://phergie.org/license New BSD License
* @link http://pear.phergie.org/package/Phergie_Plugin_Php
+ * @uses extension pdo
+ * @uses extension pdo_sqlite
+ * @uses Phergie_Plugin_Command pear.phergie.org
*/
class Phergie_Plugin_Php extends Phergie_Plugin_Abstract
{
View
8 Phergie/Plugin/Ping.php
@@ -12,22 +12,22 @@
* http://phergie.org/license
*
* @category Phergie
- * @package Phergie_Core
+ * @package Phergie
* @author Phergie Development Team <team@phergie.org>
* @copyright 2008-2010 Phergie Development Team (http://phergie.org)
* @license http://phergie.org/license New BSD License
- * @link http://pear.phergie.org/package/Phergie_Core
+ * @link http://pear.phergie.org/package/Phergie
*/
/**
* Uses a self CTCP PING to ensure that the client connection has not been
* dropped.
*
* @category Phergie
- * @package Phergie_Core
+ * @package Phergie
* @author Phergie Development Team <team@phergie.org>
* @license http://phergie.org/license New BSD License
- * @link http://pear.phergie.org/package/Phergie_Core
+ * @link http://pear.phergie.org/package/Phergie
*/
class Phergie_Plugin_Ping extends Phergie_Plugin_Abstract
{
View
8 Phergie/Plugin/Pong.php
@@ -12,21 +12,21 @@
* http://phergie.org/license
*
* @category Phergie
- * @package Phergie_Core
+ * @package Phergie
* @author Phergie Development Team <team@phergie.org>
* @copyright 2008-2010 Phergie Development Team (http://phergie.org)
* @license http://phergie.org/license New BSD License
- * @link http://pear.phergie.org/package/Phergie_Core
+ * @link http://pear.phergie.org/package/Phergie
*/
/**
* Responds to PING requests from the server.
*
* @category Phergie
- * @package Phergie_Core
+ * @package Phergie
* @author Phergie Development Team <team@phergie.org>
* @license http://phergie.org/license New BSD License
- * @link http://pear.phergie.org/package/Phergie_Core
+ * @link http://pear.phergie.org/package/Phergie
* @see http://irchelp.org/irchelp/rfc/chapter4.html#c4_6_2
* @see http://irchelp.org/irchelp/rfc/chapter4.html#c4_6_3
*/
View
8 Phergie/Plugin/Prioritize.php
@@ -12,22 +12,22 @@
* http://phergie.org/license
*
* @category Phergie
- * @package Phergie_Core
+ * @package Phergie
* @author Phergie Development Team <team@phergie.org>
* @copyright 2008-2010 Phergie Development Team (http://phergie.org)
* @license http://phergie.org/license New BSD License
- * @link http://pear.phergie.org/package/Phergie_Core
+ * @link http://pear.phergie.org/package/Phergie
*/
/**
* Prioritizes events such that they are executed in order from least to most
* destructive.
*
* @category Phergie
- * @package Phergie_Core
+ * @package Phergie
* @author Phergie Development Team <team@phergie.org>
* @license http://phergie.org/license New BSD License
- * @link http://pear.phergie.org/package/Phergie_Core
+ * @link http://pear.phergie.org/package/Phergie
*/
class Phergie_Plugin_Prioritize extends Phergie_Plugin_Abstract
{
View
1 Phergie/Plugin/Puppet.php
@@ -27,6 +27,7 @@
* @author Phergie Development Team <team@phergie.org>
* @license http://phergie.org/license New BSD License
* @link http://pear.phergie.org/package/Phergie_Plugin_Puppet
+ * @uses Phergie_Plugin_Command pear.phergie.org
*/
class Phergie_Plugin_Puppet extends Phergie_Plugin_Abstract
{
View
9 Phergie/Plugin/Quit.php
@@ -12,21 +12,22 @@
* http://phergie.org/license
*
* @category Phergie
- * @package Phergie_Core
+ * @package Phergie
* @author Phergie Development Team <team@phergie.org>
* @copyright 2008-2010 Phergie Development Team (http://phergie.org)
* @license http://phergie.org/license New BSD License
- * @link http://pear.phergie.org/package/Phergie_Core
+ * @link http://pear.phergie.org/package/Phergie
*/
/**
* Terminates the current connection upon command.
*
* @category Phergie
- * @package Phergie_Core
+ * @package Phergie
* @author Phergie Development Team <team@phergie.org>
* @license http://phergie.org/license New BSD License
- * @link http://pear.phergie.org/package/Phergie_Core
+ * @link http://pear.phergie.org/package/Phergie
+ * @uses Phergie_Plugin_Command pear.phergie.org
*/
class Phergie_Plugin_Quit extends Phergie_Plugin_Abstract
{
View
1 Phergie/Plugin/TerryChay.php
@@ -28,6 +28,7 @@
* @author Phergie Development Team <team@phergie.org>
* @license http://phergie.org/license New BSD License
* @link http://pear.phergie.org/package/Phergie_Plugin_TerryChay
+ * @uses Phergie_Plugin_Command pear.phergie.org optional
*/
class Phergie_Plugin_TerryChay extends Phergie_Plugin_Abstract
{
View
8 Phergie/Plugin/Url.php
@@ -12,11 +12,11 @@
* http://phergie.org/license
*
* @category Phergie
- * @package Phergie_Core
+ * @package Phergie
* @author Phergie Development Team <team@phergie.org>
* @copyright 2008-2010 Phergie Development Team (http://phergie.org)
* @license http://phergie.org/license New BSD License
- * @link http://pear.phergie.org/package/Phergie_Core
+ * @link http://pear.phergie.org/package/Phergie
*/
/**
@@ -27,10 +27,10 @@
* $this->getPlugin('Url')->getTitle('http://foo..').
*
* @category Phergie
- * @package Phergie_Core
+ * @package Phergie
* @author Phergie Development Team <team@phergie.org>
* @license http://phergie.org/license New BSD License
- * @link http://pear.phergie.org/package/Phergie_Core
+ * @link http://pear.phergie.org/package/Phergie
*/
class Phergie_Plugin_Url extends Phergie_Plugin_Abstract
{
View
44 Phergie/Settings.php.dist
@@ -1,44 +0,0 @@
-<?php
-
-return array(
-
- 'connections' => array(
- array(
- 'host' => 'irc.freenode.net',
- 'port' => 6667,
- 'username' => 'Elazar',
- 'realname' => 'Matthew Turland',
- 'nick' => 'Phergie2',
- 'ssl' => false
- )
- ),
-
- 'plugins' => array(
- 'AltNick',
- 'AutoJoin',
- 'Invisible',
- 'Join',
- 'Part',
- 'Ping',
- 'Pong',
- 'Prioritize',
- 'Quit'
- ),
-
- 'console' => true,
-
- 'plugins.autoload' => true,
-
- 'altnick.nicks' => array(
- 'Phergie2_'
- ),
-
- 'autojoin.channels' => '#phergie',
-
- 'ping.event' => 600,
-
- 'ping.ping' => 10,
-
- 'command.prefix' => 'Phergie2: '
-
-);
View
8 Phergie/Ui/Abstract.php
@@ -12,21 +12,21 @@
* http://phergie.org/license
*
* @category Phergie
- * @package Phergie_Core
+ * @package Phergie
* @author Phergie Development Team <team@phergie.org>
* @copyright 2008-2010 Phergie Development Team (http://phergie.org)
* @license http://phergie.org/license New BSD License
- * @link http://pear.phergie.org/package/Phergie_Core
+ * @link http://pear.phergie.org/package/Phergie
*/
/**
* Base class for end-user interfaces.
*
* @category Phergie
- * @package Phergie_Core
+ * @package Phergie
* @author Phergie Development Team <team@phergie.org>
* @license http://phergie.org/license New BSD License
- * @link http://pear.phergie.org/package/Phergie_Core
+ * @link http://pear.phergie.org/package/Phergie
*/
abstract class Phergie_Ui_Abstract
{
View
8 Phergie/Ui/Console.php
@@ -12,22 +12,22 @@
* http://phergie.org/license
*
* @category Phergie
- * @package Phergie_Core
+ * @package Phergie
* @author Phergie Development Team <team@phergie.org>
* @copyright 2008-2010 Phergie Development Team (http://phergie.org)
* @license http://phergie.org/license New BSD License
- * @link http://pear.phergie.org/package/Phergie_Core
+ * @link http://pear.phergie.org/package/Phergie
*/
/**
* End-user interface that produces console output when running the bot from
* a shell.
*
* @category Phergie
- * @package Phergie_Core
+ * @package Phergie
* @author Phergie Development Team <team@phergie.org>
* @license http://phergie.org/license New BSD License
- * @link http://pear.phergie.org/package/Phergie_Core
+ * @link http://pear.phergie.org/package/Phergie
*/
class Phergie_Ui_Console extends Phergie_Ui_Abstract
{
View
117 Phergie/build.xml
@@ -1,117 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-
-<!--
-NOTE: At the time that this file was created, the latest stable version of
-PEAR_PackageFileManager2 was 1.0.0 which was released on 2009-04-15. A bug
-was later filed for that package at the URL below on 2009-08-18. The
-included patch for this bug must be applied manually to the locally
-installed copy of the package source code in order for this build file to
-work correctly.
-
-http://pear.php.net/bugs/bug.php?id=16535
--->
-
-<project name="Phergie" default="core">
-
- <property name="build.srcdir" value="../" />
- <property name="build.relnotes" value="Initial release" />
-
- <target name="core">
- <property name="build.version" value="2.0.0" />
- <property name="build.stability" value="beta" />
- <property name="build.name" value="Phergie-${build.version}" />
- <property name="build.tarball" value="${build.name}.tgz" />
- <property name="build.relnotes" value="Initial release" />
-
- <fileset dir="${build.srcdir}" id="core">
- <include name="Phergie/Autoload.php" />
- <include name="Phergie/Bootstrap.php" />
- <include name="Phergie/Bot.php" />
- <include name="Phergie/Config/Exception.php" />
- <include name="Phergie/Config.php" />
- <include name="Phergie/Connection/Exception.php" />
- <include name="Phergie/Connection/Handler.php" />
- <include name="Phergie/Connection.php" />
- <include name="Phergie/Driver/Abstract.php" />
- <include name="Phergie/Driver/Exception.php" />
- <include name="Phergie/Driver/Streams.php" />
- <include name="Phergie/Event/Abstract.php" />
- <include name="Phergie/Event/Command.php" />
- <include name="Phergie/Event/Exception.php" />
- <include name="Phergie/Event/Handler.php" />
- <include name="Phergie/Event/Request.php" />
- <include name="Phergie/Event/Response.php" />
- <include name="Phergie/Exception.php" />
- <include name="Phergie/Hostmask/Exception.php" />
- <include name="Phergie/Hostmask.php" />
- <include name="Phergie/Plugin/Abstract.php" />
- <include name="Phergie/Plugin/AltNick.php" />
- <include name="Phergie/Plugin/AutoJoin.php" />
- <include name="Phergie/Plugin/Command.php" />
- <include name="Phergie/Plugin/Ctcp.php" />
- <include name="Phergie/Plugin/Exception.php" />
- <include name="Phergie/Plugin/Handler.php" />
- <include name="Phergie/Plugin/Invisible.php" />
- <include name="Phergie/Plugin/Ping.php" />
- <include name="Phergie/Plugin/Pong.php" />
- <include name="Phergie/Plugin/Prioritize.php" />
- <include name="Phergie/Plugin/Quit.php" />
- <include name="Phergie/Plugin/Url.php" />
- <include name="Phergie/Ui/Abstract.php" />
- <include name="Phergie/Ui/Console.php" />
- </fileset>
-
- <fileset dir="${build.srcdir}/Phergie" id="data">
- <include name="LICENSE" />
- <include name="Settings.php.dist" />
- </fileset>
-
- <delete file="${build.tarball}" quiet="true" />
-
- <mkdir dir="${build.name}" />
-
- <copy todir="${build.name}">
- <fileset refid="core" />
- <fileset refid="data" />
- </copy>
-
- <pearpkg2 name="Phergie" dir="${build.name}">
- <fileset refid="core" />
- <fileset refid="data" />
- <option name="baseinstalldir" value="/" />
- <option name="outputdirectory" value="./" />
- <option name="channel" value="pear.phergie.org"/>
- <option name="summary" value="Phergie core libraries"/>
- <option name="description" value="The Phergie package provides all files necessary to run a basic IRC bot."/>
- <option name="apiversion" value="${build.version}"/>
- <option name="apistability" value="${build.stability}"/>
- <option name="releaseversion" value="${build.version}"/>
- <option name="releasestability" value="${build.stability}"/>
- <option name="license" value="http://phergie.org/license New BSD License"/>
- <option name="phpdep" value="5.2.0"/>
- <option name="pearinstallerdep" value="1.9.0"/>
- <option name="packagetype" value="php"/>
- <option name="notes" value="${build.relnotes}"/>
- <mapping name="maintainers">
- <element>
- <element key="handle" value="team"/>
- <element key="name" value="Phergie Development Team"/>
- <element key="email" value="team@phergie.org"/>
- <element key="role" value="lead"/>
- </element>
- </mapping>
- </pearpkg2>
-
- <tar destfile="${build.tarball}" compression="gzip">
- <fileset dir="./">
- <include name="${build.name}**" />
- <include name="package.xml" />
- </fileset>
- </tar>
-
- <delete dir="${build.name}" />
-
- <delete file="package.xml" />
- </target>
-
-</project>
View
83 PhergiePackageTask.php
@@ -0,0 +1,83 @@
+<?php
+
+require_once 'phing/tasks/ext/PearPackage2Task.php';
+
+class PhergiePackageTask extends PearPackage2Task
+{
+ protected function setOptions()
+ {
+ $this->pkg->addMaintainer('lead', 'team', 'Phergie Development Team', 'team@phergie.org');
+
+ if (strpos($this->package, 'Plugin') !== false) {
+ $path = str_replace('_', DIRECTORY_SEPARATOR, $this->package) . '.php';
+ $contents = file_get_contents($path);
+ preg_match_all('#/\*\*(.*)\*/#Ums', $contents, $matches, PREG_SET_ORDER);
+ $doc = $matches[1][1];
+ $doc = preg_split('/\v+/', $doc);
+ $doc = preg_grep('/@uses/', $doc);
+ $doc = preg_replace('/\s*\* @uses\s+|\s+$/', '', $doc);
+ foreach ($doc as $line) {
+ if (strpos($line, 'extension') === 0) {
+ $line = explode(' ', $line);
+ $name = $line[1];
+ $optional = 'required';
+ if (isset($line[2])) {
+ $optional = $line[2];
+ }
+ $this->pkg->addExtensionDep(
+ $optional,
+ $name
+ );
+ } else {
+ $line = explode(' ', $line);
+ $name = $line[0];
+ $channel = $line[1];
+ $optional = 'required';
+ if (isset($line[2])) {
+ $optional = $line[2];
+ }
+ $this->pkg->addPackageDepWithChannel(
+ $optional,
+ $name,
+ $channel
+ );
+ }
+ }
+ }
+
+ $newmap = array();
+ foreach ($this->mappings as $key => $map) {
+ switch ($map->getName()) {
+ case 'releases':
+ $releases = $map->getValue();
+ foreach ($releases as $release) {
+ $this->pkg->addRelease();
+ if (isset($release['installconditions'])) {
+ if (isset($release['installconditions']['os'])) {
+ $this->pkg->setOsInstallCondition($release['installconditions']['os']);
+ }
+ }
+ if (isset($release['filelist'])) {
+ if (isset($release['filelist']['install'])) {
+ foreach ($release['filelist']['install'] as $file => $as) {
+ $this->pkg->addInstallAs($file, $as);
+ }
+ }
+ if (isset($release['filelist']['ignore'])) {
+ foreach ($release['filelist']['ignore'] as $file) {
+ $this->pkg->addIgnoreToRelease($file);
+ }
+ }
+ }
+ }
+ break;
+
+ default:
+ $newmap[] = $map;
+ }
+ }
+ $this->mappings = $newmap;
+
+ parent::setOptions();
+ }
+}
View
33 Settings.php.dist
@@ -0,0 +1,33 @@
+<?php
+
+return array(
+
+ // One array per connection, pretty self-explanatory
+ 'connections' => array(
+ // Ex: All connection info for the Freenode network
+ array(
+ 'host' => 'irc.freenode.net',
+ 'port' => 6667,
+ 'username' => 'Elazar',
+ 'realname' => 'Matthew Turland',
+ 'nick' => 'Phergie2',
+ // 'password' => 'password goes here if needed',
+ // 'ssl' => false // change to true to connect using SSL
+ )
+ ),
+
+ // Whitelist of plugins to load
+ 'plugins' => array(
+ // 'ShortPluginName'
+ // ex: 'AutoJoin' for 'Phergie_Plugin_AutoJoin'
+ ),
+
+ // If set to true, this allows any plugin dependencies for plugins
+ // listed in the 'plugins' option to be loaded even if they are not
+ // explicitly included in that list
+ 'plugins.autoload' => true,
+
+ // Enables shell output describing bot events via Phergie_Ui_Console
+ 'console' => true,
+
+);
View
238 build.xml
@@ -0,0 +1,238 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<project name="Phergie" default="core">
+
+ <tstamp>
+ <format property="DSTAMP" pattern="%Y-%m-%d" />
+ </tstamp>
+
+ <taskdef name="phergiepkg" classname="PhergiePackageTask" />
+
+ <available file="./build.properties" property="have_properties_file" />
+
+ <property name="clean" value="true" />
+
+ <target name="input">
+
+ <if>
+ <equals arg1="${have_properties_file}" arg2="true" />
+ <then>
+ <property file="./build.properties" />
+ </then>
+ <else>
+ <input propertyname="build.srcdir" defaultvalue="./" message="Source directory" />
+ <input propertyname="build.dstdir" defaultvalue="./" message="Destination directory" />
+ <input propertyname="build.version.release" message="Release version" />
+ <input propertyname="build.version.api" message="API version" />
+ <input propertyname="build.stability.release" defaultvalue="stable" message="Release stability" validArgs="snapshot,devel,alpha,beta,stable" />
+ <input propertyname="build.stability.api" defaultvalue="stable" message="API stability" validArgs="snapshot,devel,alpha,beta,stable" />
+ <input propertyname="build.notes" message="Release notes" />
+ <input propertyname="build.phpdep" defaultvalue="5.2.0" message="PHP version required" />
+ <input propertyname="build.pearinstallerdep" defaultvalue="1.9.0" message="PEAR installer version required" />
+ </else>
+ </if>
+
+ </target>
+
+ <target name="core" depends="input">
+
+ <property name="build.tmpdir" value="Phergie-${build.version.release}" />
+ <property name="build.tarball" value="${build.dstdir}${build.tmpdir}.tgz" />
+
+ <fileset dir="${build.srcdir}" id="core">
+ <include name="phergie.php" />
+ <include name="phergie.bat" />
+ <include name="LICENSE" />
+ <include name="Settings.php.dist" />
+ <include name="Phergie/Autoload.php" />
+ <include name="Phergie/Bot.php" />
+ <include name="Phergie/Config/Exception.php" />
+ <include name="Phergie/Config.php" />
+ <include name="Phergie/Connection/Exception.php" />
+ <include name="Phergie/Connection/Handler.php" />
+ <include name="Phergie/Connection.php" />
+ <include name="Phergie/Driver/Abstract.php" />
+ <include name="Phergie/Driver/Exception.php" />
+ <include name="Phergie/Driver/Streams.php" />
+ <include name="Phergie/Event/Abstract.php" />
+ <include name="Phergie/Event/Command.php" />
+ <include name="Phergie/Event/Exception.php" />
+ <include name="Phergie/Event/Handler.php" />
+ <include name="Phergie/Event/Request.php" />
+ <include name="Phergie/Event/Response.php" />
+ <include name="Phergie/Exception.php" />
+ <include name="Phergie/Hostmask/Exception.php" />
+ <include name="Phergie/Hostmask.php" />
+ <include name="Phergie/Plugin/Abstract.php" />
+ <include name="Phergie/Plugin/Exception.php" />
+ <include name="Phergie/Plugin/Handler.php" />
+ <include name="Phergie/Ui/Abstract.php" />
+ <include name="Phergie/Ui/Console.php" />
+ </fileset>
+
+ <delete file="${build.tarball}" quiet="true" />
+
+ <mkdir dir="${build.tmpdir}" />
+
+ <copy todir="${build.tmpdir}">
+ <fileset refid="core" />
+ </copy>
+
+ <phergiepkg name="Phergie" dir="${build.tmpdir}">
+ <fileset refid="core" />
+ <option name="baseinstalldir" value="/" />
+ <option name="outputdirectory" value="${build.dstdir}" />
+ <option name="channel" value="pear.phergie.org"/>
+ <option name="summary" value="Phergie core library"/>
+ <option name="description" value="The Phergie package provides all files necessary to run a basic IRC bot."/>
+ <option name="apiversion" value="${build.version.api}"/>
+ <option name="apistability" value="${build.stability.api}"/>
+ <option name="releaseversion" value="${build.version.release}"/>
+ <option name="releasestability" value="${build.stability.release}"/>
+ <option name="phpdep" value="${build.phpdep}" />
+ <option name="pearinstallerdep" value="${build.pearinstallerdep}" />
+ <option name="license" value="http://phergie.org/license New BSD License"/>
+ <option name="packagetype" value="php"/>
+ <option name="notes" value="${build.notes}"/>
+ <mapping name="replacements">
+ <element>
+ <element key="path" value="phergie.php" />
+ <element key="type" value="pear-config" />
+ <element key="from" value="/usr/bin/env php" />
+ <element key="to" value="php_bin" />
+ </element>
+ <element>
+ <element key="path" value="phergie.bat" />
+ <element key="type" value="pear-config" />
+ <element key="from" value="@php_bin@" />
+ <element key="to" value="php_bin" />
+ </element>
+ <element>
+ <element key="path" value="phergie.bat" />
+ <element key="type" value="pear-config" />
+ <element key="from" value="@bin_dir@" />
+ <element key="to" value="bin_dir" />
+ </element>
+ </mapping>
+ <mapping name="exceptions">
+ <element key="phergie.php" value="script" />
+ <element key="phergie.bat" value="script" />
+ </mapping>
+ <mapping name="releases">
+ <element>
+ <element key="installconditions">
+ <element key="os" value="windows" />
+ </element>
+ <element key="filelist">
+ <element key="install">
+ <element key="phergie.php" value="phergie" />
+ </element>
+ </element>
+ </element>
+ <element>
+ <element key="filelist">
+ <element key="install">
+ <element key="phergie.php" value="phergie" />
+ </element>
+ <element key="ignore">
+ <element value="phergie.bat" />
+ </element>
+ </element>
+ </element>
+ </mapping>
+ <mapping name="deps">
+ <element>
+ <element key="type" value="ext" />
+ <element key="name" value="pcre" />
+ </element>
+ <element>
+ <element key="type" value="ext" />
+ <element key="name" value="reflection" />
+ </element>
+ </mapping>
+ </phergiepkg>
+
+ <tar destfile="${build.tarball}" compression="gzip">
+ <fileset dir="${build.dstdir}">
+ <include name="${build.tmpdir}**" />
+ <include name="package.xml" />
+ </fileset>
+ </tar>
+
+ <if>
+ <istrue value="${clean}" />
+ <then>
+ <delete dir="${build.tmpdir}" />
+ <delete file="${build.dstdir}package.xml" />
+ </then>
+ </if>
+
+ </target>
+
+ <target name="plugin" depends="input">
+
+ <if>
+ <equals arg1="${have_properties_file}" arg2="true" />
+ <then>
+ <property file="./build.properties" />
+ </then>
+ <else>
+ <input propertyname="build.plugin" message="Short plugin name" />
+ <input propertyname="build.summary" message="Plugin summary" />
+ <input propertyname="build.description" message="Plugin description" />
+ </else>
+ </if>
+
+ <property name="build.class" value="Phergie_Plugin_${build.plugin}" />
+ <property name="build.tmpdir" value="${build.class}-${build.version.release}" />
+ <property name="build.tarball" value="${build.dstdir}${build.tmpdir}.tgz" />
+
+ <fileset dir="${build.srcdir}Phergie/Plugin" id="plugin">
+ <include name="${build.plugin}.php" />
+ <include name="${build.plugin}/**" />
+ </fileset>
+
+ <delete file="${build.tarball}" quiet="true" />
+
+ <mkdir dir="${build.tmpdir}" />
+
+ <copy todir="${build.tmpdir}">
+ <fileset refid="plugin" />
+ </copy>
+
+ <phergiepkg name="${build.class}" dir="${build.tmpdir}">
+ <fileset refid="plugin" />
+ <option name="baseinstalldir" value="/" />
+ <option name="outputdirectory" value="${build.dstdir}" />
+ <option name="channel" value="pear.phergie.org"/>
+ <option name="summary" value="${build.summary}"/>
+ <option name="description" value="${build.description}"/>
+ <option name="apiversion" value="${build.version.api}"/>
+ <option name="apistability" value="${build.stability.api}"/>
+ <option name="releaseversion" value="${build.version.release}"/>
+ <option name="releasestability" value="${build.stability.release}"/>
+ <option name="phpdep" value="${build.phpdep}" />
+ <option name="pearinstallerdep" value="${build.pearinstallerdep}" />
+ <option name="license" value="http://phergie.org/license New BSD License"/>
+ <option name="packagetype" value="php"/>
+ <option name="notes" value="${build.notes}"/>
+ </phergiepkg>
+
+ <tar destfile="${build.tarball}" compression="gzip">
+ <fileset dir="${build.dstdir}">
+ <include name="${build.tmpdir}**" />
+ <include name="package.xml" />
+ </fileset>
+ </tar>
+
+ <if>
+ <istrue value="${clean}" />
+ <then>
+ <delete dir="${build.tmpdir}" />
+ <delete file="${build.dstdir}package.xml" />
+ </then>
+ </if>
+
+ </target>
+
+</project>
View
14 phergie.bat
@@ -0,0 +1,14 @@
+@echo off
+REM Phergie
+REM
+REM PHP version 5
+REM
+REM LICENSE
+REM
+REM This source file is subject to the new BSD license that is bundled
+REM with this package in the file LICENSE.
+REM It is also available through the world-wide-web at this URL:
+REM http://phergie.org/license
+
+set PHPBIN="@php_bin@"
+%PHPBIN% "@bin_dir@\phergie" %*
View
14 Phergie/Bootstrap.php → phergie.php
@@ -1,3 +1,4 @@
+#!/usr/bin/env php
<?php
/**
* Phergie
@@ -12,15 +13,24 @@
* http://phergie.org/license
*
* @category Phergie
- * @package Phergie_Core
+ * @package Phergie
* @author Phergie Development Team <team@phergie.org>
* @copyright 2008-2010 Phergie Development Team (http://phergie.org)
* @license http://phergie.org/license New BSD License
- * @link http://pear.phergie.org/package/Phergie_Core
+ * @link http://pear.phergie.org/package/Phergie
*/
require 'Autoload.php';
Phergie_Autoload::registerAutoloader();
$bot = new Phergie_Bot;
+
+if ($argc > 0) {
+ $config = new Phergie_Config;
+ foreach ($argv as $file) {
+ $config->read($file);
+ }
+ $bot->setConfig($config);
+}
+
$bot->run();

0 comments on commit 4e625ed

Please sign in to comment.
Something went wrong with that request. Please try again.