public function findObjectByMethod($method, $value, array $methodArgs = array()) {
        foreach ($this as $object) {
            if (method_exists($object, $method)) {
                if ($value === call_user_func_array(array($object, $method), $methodArgs))
                    return $object;
            }
        }
    }
public function findObjectByMethod($method, $value, array $methodArgs = array()) {
        foreach ($this as $object) {
            if (method_exists($object, $method)) {
                if ($value === call_user_func_array(array($object, $method), $methodArgs))
                    return $object;
            }
        }
    }
public function findObjectByMethod ( $ method , $ value , array $ methodArgs = array ( ) ) { foreach ( $ this as $ object ) { if ( method_exists ( $ object , $ method ) ) { if ( $ value === call_user_func_array ( array ( $ object , $ method ) , $ methodArgs ) ) return $ object ; } } }
Finds the first object that the given method returns the given value
@param string $method
@param mixed $value
@param array $methodArgs
@return mixed
Finds the first object that the given method returns the given value