Initialize the Switch_SNMP object
Switch_SNMP
__construct
(mixed $ip)
-
mixed
$ip: IP address of the switch
Redefinition of:
- Common::__construct()
- Get the current instance of our Settings and Logger classes
Return all properties assigned to this system. This method is here only for debugging purposes, please delete it after
array
getAllProps
()
Get the description for the specified port
mixed
getPortDescription
(mixed $port, [mixed $port_index = false], [mixed $community = false])
-
mixed
$port: The port name
-
mixed
$port_index: SNMP port index if available
-
mixed
$community: SNMP community to use
Get the status for the specified port
mixed
getPortStatus
(mixed $port, [mixed $port_index = false], [mixed $community = false])
-
mixed
$port: The port name
-
mixed
$port_index: SNMP port index if available
-
mixed
$community: SNMP community to use
Get port type for the specified port
mixed
getPortType
(mixed $port, [mixed $port_index = false], [mixed $community = false])
-
mixed
$port: The port name
-
mixed
$port_index: SNMP port index if available
-
mixed
$community: SNMP community to use
Get the vlan associated to the specified port
mixed
getVlanOnPort
(mixed $port, [mixed $port_index = false], [mixed $community = false])
-
mixed
$port: The port name
-
mixed
$port_index: SNMP port index if available
-
mixed
$community: SNMP community to use
Get the vlan id as declared in the switch for the requested vlan name
mixed
getVlan_ID
(mixed $vlan_name, [mixed $community = false])
-
mixed
$vlan_name: The name of the vlan we are interested in
-
mixed
$community: SNMP community to use
Program the specified vlan on the specified port
boolean
programVlanOnPort
(mixed $port_name, mixed $vlan_name, [mixed $community = false])
-
mixed
$port_name: The port name
-
mixed
$vlan_name: Vlan name to program
-
mixed
$community: SNMP community to use
Turn on the specified port
boolean
restartPort
(mixed $port, [mixed $port_index = false], [mixed $community = false])
-
mixed
$port: The port name
-
mixed
$port_index: SNMP port index if available
-
mixed
$community: SNMP community to use
Set a port to VMPS
boolean
SetPortToDynamic
(mixed $port_name, [mixed $community = false])
-
mixed
$port_name: The port name
-
mixed
$community: SNMP community to use
Turn off the specified port
boolean
turnOffPort
(mixed $port, [mixed $port_index = false], [mixed $community = false])
-
mixed
$port: The port name
-
mixed
$port_index: SNMP port index if available
-
mixed
$community: SNMP community to use
Turn on the specified port
boolean
turnOnPort
(mixed $port, [mixed $port_index = false], [mixed $community = false])
-
mixed
$port: The port name
-
mixed
$port_index: SNMP port index if available
-
mixed
$community: SNMP community to use
Interceptor to call the poll function associated to a certain property
with this interceptor is possible to do something like $object->property() and if property is already defined, it'll return its value. If not, it will call its associated function as long as there is a pollProperty method present in the class. Then it'll return the value of the property
mixed
__call
(mixed $methodName, array $parameters)
-
mixed
$methodName: The name of the property we want to know
-
array
$parameters: The parameters to use. Ideally only an SNMP community will be used
Get the value of one property if it exists
mixed
__get
(mixed $key)
-
mixed
$key: Property to lookup
Inherited Methods
Inherited From Common
Common::__construct()
Common::getConnection()
Common::htmlescape()
Common::log2db()
Common::real_escape_string1()
Common::sqlescape()