mirror of
https://github.com/ZoneMinder/zoneminder.git
synced 2026-04-04 14:04:17 -04:00
add setting of values to anonymouse member function
This commit is contained in:
@@ -48,10 +48,16 @@ class Event {
|
||||
}
|
||||
|
||||
public function __call( $fn, array $args){
|
||||
if ( count( $args ) ) {
|
||||
$this->{$fn} = $args[0];
|
||||
}
|
||||
if ( array_key_exists( $fn, $this ) ) {
|
||||
return $this->{$fn};
|
||||
#array_unshift($args, $this);
|
||||
#call_user_func_array( $this->{$fn}, $args);
|
||||
|
||||
$backTrace = debug_backtrace();
|
||||
$file = $backTrace[1]['file'];
|
||||
$line = $backTrace[1]['line'];
|
||||
Warning( "Unknown function call Event->$fn from $file:$line" );
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -36,10 +36,16 @@ class Frame {
|
||||
return new Event( $this->{'EventId'} );
|
||||
}
|
||||
public function __call( $fn, array $args){
|
||||
if( array_key_exists( $fn, $this ) ) {
|
||||
if ( count( $args ) ) {
|
||||
$this->{$fn} = $args[0];
|
||||
}
|
||||
if ( array_key_exists( $fn, $this ) ) {
|
||||
return $this->{$fn};
|
||||
#array_unshift($args, $this);
|
||||
#call_user_func_array( $this->{$fn}, $args);
|
||||
|
||||
$backTrace = debug_backtrace();
|
||||
$file = $backTrace[1]['file'];
|
||||
$line = $backTrace[1]['line'];
|
||||
Warning( "Unknown function call Frame->$fn from $file:$line" );
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -58,10 +58,16 @@ class Storage {
|
||||
}
|
||||
|
||||
public function __call( $fn, array $args= NULL){
|
||||
if(isset($this->{$fn})){
|
||||
if ( count( $args ) ) {
|
||||
$this->{$fn} = $args[0];
|
||||
}
|
||||
if ( array_key_exists( $fn, $this ) ) {
|
||||
return $this->{$fn};
|
||||
#array_unshift($args, $this);
|
||||
#call_user_func_array( $this->{$fn}, $args);
|
||||
|
||||
$backTrace = debug_backtrace();
|
||||
$file = $backTrace[1]['file'];
|
||||
$line = $backTrace[1]['line'];
|
||||
Warning( "Unknown function call Storage->$fn from $file:$line" );
|
||||
}
|
||||
}
|
||||
public static function find_all() {
|
||||
|
||||
@@ -127,10 +127,10 @@ function dbQuery( $sql, $params=NULL ) {
|
||||
} else {
|
||||
$result = $dbConn->query( $sql );
|
||||
}
|
||||
//if ( $params )
|
||||
//Warning("SQL: $sql" . implode(',',$params));
|
||||
//else
|
||||
//Warning("SQL: $sql" );
|
||||
if ( $params )
|
||||
Warning("SQL: $sql" . implode(',',$params));
|
||||
else
|
||||
Warning("SQL: $sql" );
|
||||
} catch(PDOException $e) {
|
||||
Error( "SQL-ERR '".$e->getMessage()."', statement was '".$sql."' params:" . implode(',',$params) );
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user