Overview

Packages

  • LegiScan
    • API
    • Cache
    • Common
    • Exceptions
    • Utility
  • PHP

Classes

  • LegiScan
  • LegiScan_CommandLine
  • LegiScan_Endpoint
  • LegiScan_Import
  • LegiScan_WebTest
  • LegiScan_Worker
  • Overview
  • Package
  • Class

Class LegiScan

A generic holder for some core static functions

Non-inherited class primarily for static calls to pull configuration values, write log messages, send mail alerts and hold constants. You will likely find LegiScan_Pull and LegiScan_Process of much greater interest.

Package: LegiScan\Utility
Copyright: 2010-2020 LegiScan LLC
License: https://opensource.org/licenses/BSD-2-Clause
Author: LegiScan API Team api@legiscan.com
Link: https://api.legiscan.com/dl/
Link: https://legiscan.com/legiscan
Located at LegiScan.php
Methods summary
public static mixed
# getConfig( string|null $key = null, mixed|null $default = null )

Get the configuation array or a specific key from it

Get the configuation array or a specific key from it

Parameters

$key
(OPTIONAL) Return $key from config array
$default
(OPTIONAL) If $key does not exist return $default

Returns

mixed
Either the configuration array or a specific $key value
public static
# fileLog( string $msg, string $file = null )

Write log message to file located at {log_dir}/legiscan.log

Write log message to file located at {log_dir}/legiscan.log

Parameters

$msg
The log message to be written
$file
(OPTIONAL) If specified write log to {log_dir}/$file

Throws

APIAccessException
public static
# sendMail( string $subject, string $body )

Send an email to the address specified in config.php, throttled to 1 msg/5 min (overflow sent to fileLog)

Send an email to the address specified in config.php, throttled to 1 msg/5 min (overflow sent to fileLog)

Parameters

$subject
The email subject
$body
The email body
public static string
# getVersion( )

Get the LegiScan version number

Get the LegiScan version number

Returns

string
Version number
Constants summary
string VERSION

Version number of the LegiScan API Client

Version number of the LegiScan API Client

# '1.4.1'
integer SCHEMA_VERSION

Version number of the LegiScan API database schema

Version number of the LegiScan API database schema

# 9
string API_OK

Response string for a successful response

Response string for a successful response

# 'OK'
string API_ERROR

Response string for a failure response

Response string for a failure response

# 'ERROR'
integer IMPORT_NONE

MasterList/Search import control, do nothing

MasterList/Search import control, do nothing

# 0
integer IMPORT_NEW

MasterList/Search import control, only new bills

MasterList/Search import control, only new bills

# 1
integer IMPORT_CHANGED

MasterList/Search import control, only changed bills

MasterList/Search import control, only changed bills

# 2
integer IMPORT_ALL

MasterList/Search import control, all bills

MasterList/Search import control, all bills

# 3
integer STANCE_WATCH

setMonitor stance, watch bill

setMonitor stance, watch bill

# 0
integer STANCE_SUPPORT

setMonitor stance, support bill

setMonitor stance, support bill

# 1
integer STANCE_OPPOSE

setMonitor stance, oppose bill

setMonitor stance, oppose bill

# 2
LegiScan API Client API documentation generated by ApiGen