PHP 클래스 HistoryReader, sslscrobbler

저자: Ben XO ([email protected]) @copyright Copyright (c) 2010 Ben XO @license MIT License (http://www.opensource.org/licenses/mit-license.html) Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
상속: implements SSLPluggable, implements SSLFilenameSource
파일 보기 프로젝트 열기: ben-xo/sslscrobbler 1 사용 예제들

보호된 프로퍼티들

프로퍼티 타입 설명
$appname
$cli_plugins Plugins that can return SSLPlugins, configured from the command line
$csv
$dir_provided
$dump_and_exit command line switches
$dump_type
$filename
$help
$historydir
$log_file
$logger Logger
$manual_tick
$override_verbosity
$plugin_manager PluginManager
$post_process
$sleep
$verbosity
$wait_for_file

공개 메소드들

메소드 설명
__construct ( )
addCLIPlugin ( CLIPlugin $plugin ) Enable a CLI plugin.
addPlugin ( SSLPlugin $plugin )
getNewFilename ( )
main ( $argc, array $argv ) The main entry point to the application. Start here! When this returns, the program is done.
setVerbosityOverride ( array $override ) Takes an array of class names => log levels. Mainly you can use this to shut certain classes up that are too noisy at a particular log level, e.g. TickSource (which normally sends a L::DEBUG message every 2 seconds).
usage ( $appname, array $argv )

보호된 메소드들

메소드 설명
getDefaultHistoryDir ( )
getMostRecentFile ( $from_dir, $type )
monitor ( $filename ) Sets up and couples the event-driven history monitoring components, and then starts the clock.
parseOptions ( array $argv )
post_process ( $filename )
setupLogging ( )

메소드 상세

__construct() 공개 메소드

public __construct ( )

addCLIPlugin() 공개 메소드

Enable a CLI plugin.
public addCLIPlugin ( CLIPlugin $plugin )
$plugin CLIPlugin

addPlugin() 공개 메소드

public addPlugin ( SSLPlugin $plugin )
$plugin SSLPlugin

getDefaultHistoryDir() 보호된 메소드

protected getDefaultHistoryDir ( )

getMostRecentFile() 보호된 메소드

protected getMostRecentFile ( $from_dir, $type )

getNewFilename() 공개 메소드

public getNewFilename ( )

main() 공개 메소드

Program flow: * Parse options * Set up logging, if requested * Ask plugins to do any early setup - this is where Last.fm / Twitter do OAuth etc * If no filename was supplied, either wait for a new one to be created in the default ScratchLive history folder (polls every 2 seconds), or go for the most recent (when --immediate is specified). * If --dump was specified, display the structure of the file and exit. (Very useful for probing ScratchLive files). * Otherwise, start monitoring the file.
public main ( $argc, array $argv )
$argc (from GLOBAL)
$argv array (from GLOBAL)

monitor() 보호된 메소드

A signal handler is installed to catch Ctrl-C, although it's still safer to shutdown ScratchLive! first if you want everything scrobbled correctly. --post-process can be used to replay a file. --manual to ticks on user input (for debugging. Overrides --post-process for ticks). --csv can be used to replay from a CSV fake-file. These options can be combined.
protected monitor ( $filename )

parseOptions() 보호된 메소드

protected parseOptions ( array $argv )
$argv array

post_process() 보호된 메소드

protected post_process ( $filename )

setVerbosityOverride() 공개 메소드

Takes an array of class names => log levels. Mainly you can use this to shut certain classes up that are too noisy at a particular log level, e.g. TickSource (which normally sends a L::DEBUG message every 2 seconds).
public setVerbosityOverride ( array $override )
$override array

setupLogging() 보호된 메소드

protected setupLogging ( )

usage() 공개 메소드

public usage ( $appname, array $argv )
$argv array

프로퍼티 상세

$appname 보호되어 있는 프로퍼티

protected $appname

$cli_plugins 보호되어 있는 프로퍼티

Plugins that can return SSLPlugins, configured from the command line
protected $cli_plugins

$csv 보호되어 있는 프로퍼티

protected $csv

$dir_provided 보호되어 있는 프로퍼티

protected $dir_provided

$dump_and_exit 보호되어 있는 프로퍼티

command line switches
protected $dump_and_exit

$dump_type 보호되어 있는 프로퍼티

protected $dump_type

$filename 보호되어 있는 프로퍼티

protected $filename

$help 보호되어 있는 프로퍼티

protected $help

$historydir 보호되어 있는 프로퍼티

protected $historydir

$log_file 보호되어 있는 프로퍼티

protected $log_file

$logger 보호되어 있는 프로퍼티

protected Logger $logger
리턴 Logger

$manual_tick 보호되어 있는 프로퍼티

protected $manual_tick

$override_verbosity 보호되어 있는 프로퍼티

protected $override_verbosity

$plugin_manager 보호되어 있는 프로퍼티

protected PluginManager $plugin_manager
리턴 PluginManager

$post_process 보호되어 있는 프로퍼티

protected $post_process

$sleep 보호되어 있는 프로퍼티

protected $sleep

$verbosity 보호되어 있는 프로퍼티

protected $verbosity

$wait_for_file 보호되어 있는 프로퍼티

protected $wait_for_file