<?php
/**
 * @version 0.1.0
 * @link http://www.xapp-studio.com
 * @author Guenter Baumgart
 * @license : GPL v2. http://www.gnu.org/licenses/gpl-2.0.html
 * @package XApp\xide\Logging
 */
xapp_import("xapp.Commons.Entity");
xapp_import('xapp.Utils.Strings');
xapp_import('xapp.Utils.Shell');
xapp_import('xapp.xide.Base.Manager');

/***
 * Class XIDE_NodeJS_Service_Manager provides a useful set of NodeJS related functions like :
 * -start, stop, kill and also debug (uses and starts a 'node-inspector', needs Chrome on the clients side)!
 * -enumerate running services, as well its child processes ('spawned')
 */
class XIDE_Log_Manager extends XIDE_Manager{

    /////////////////////////////////////////////////////////////////////////////////////////
    //
    //  Hook/Event Keys
    //
    ////////////////////////////////////////////////////////////////////////////////////////

    /////////////////////////////////////////////////////////////////////////////////////////
    //
    //  Constants
    //
    ////////////////////////////////////////////////////////////////////////////////////////

    /////////////////////////////////////////////////////////////////////////////////////////
    //
    //  Options
    //
    ////////////////////////////////////////////////////////////////////////////////////////

    //Standard options
    const LOG_PATH                      = "XAPP_NODEJS_WORKING_PATH";
    const EMITS                             = "XAPP_EMITS"; //disable or enable hooks
    const REWRITE_HOST                      = "XAPP_NODEJS_HOST_REWRITE"; //rewrite server host to this server IP
	const FORCE_HOST                        = "XAPP_NODEJS_FORCE_HOST"; //rewrite server host to this server IP


    /**
     * options dictionary for this class containing all data type values
     *
     * @var array
     */
    public static $optionsDict = array
    (
        self::LOG_PATH              => XAPP_TYPE_STRING

    );

    /**
     * options mandatory map for this class contains all mandatory values
     *
     * @var array
     */
    public static $optionsRule = array
    (
        self::LOG_PATH              => 0

    );

    /**
     * options default value array containing all class option default values
     * @var array
     */
    public $options = array
    (
        self::LOG_PATH              => 'Utils/nodejs/logs/'


    );

    public function ls(){

        /*$type       = xo_get(XApp_Variable_Mixin::RESOURCES_TYPE,$this);
        $result     = array();//final list*/
    }

    /**
     * class constructor
     * call parent constructor for class initialization
     *
     * @error 14601
     * @param null|array|object $options expects optional options
     */
    function __construct($options = null)
    {
        parent::__construct($options);
        //standard constructor
        xapp_set_options($options, $this);
    }
    /////////////////////////////////////////////////////////////////////////////////////////
    //
    //  Utils
    //  @TODO : find a better place to dance!
    //
    ////////////////////////////////////////////////////////////////////////////////////////

}


?>