QuickBooks/Callbacks.php
static protected function _type(&$callback, $Driver = null, $ticket = null)
	{
		// This first section turns things like this:   array( 'MyClassName', 'myStaticMethod' )    into this:   'MyClassName::myStaticMethod'
		if (is_array($callback))
		{
			if (isset($callback[0]) and
				isset($callback[1]) and
				is_string($callback[0]) and
				is_string($callback[1]))
			{
				$callback = $callback[0] . '::' . $callback[1];
			}
			else if (isset($callback[0]) and
					 isset($callback[1]) and
					 is_object($callback[0]) and
					 is_string($callback[1]))
			{
				; // Do nothing
			}
			else
			{
				if ($Driver)
				{
					$Driver->log('Invalid callback format: ' . print_r($callback, true), $ticket, QUICKBOOKS_LOG_NORMAL);
				}

				return false;
			}
		}

		// This section actually determines the callback type
		if (!$callback)
		{
			return QUICKBOOKS_CALLBACKS_TYPE_NONE;
		}
		else if (is_array($callback))
		{
			return QUICKBOOKS_CALLBACKS_TYPE_OBJECT_METHOD;
		}
		else if (is_string($callback) and false === strpos($callback, '::'))
		{
			return QUICKBOOKS_CALLBACKS_TYPE_FUNCTION;
		}
		else if (is_string($callback) and false !== strpos($callback, '::'))
		{
			return QUICKBOOKS_CALLBACKS_TYPE_STATIC_METHOD;
		}
		else if (is_object($callback) and $callback instanceof QuickBooks_Hook)
		{
			return QUICKBOOKS_CALLBACKS_TYPE_HOOK_INSTANCE;
		}

		if ($Driver)
		{
			// Log this...
			$Driver->log('Could not determine callback type: ' . gettype($callback), $ticket, QUICKBOOKS_LOG_NORMAL);
		}

		return false;
	}
static protected function _type(&$callback, $Driver = null, $ticket = null)
	{
		// This first section turns things like this:   array( 'MyClassName', 'myStaticMethod' )    into this:   'MyClassName::myStaticMethod'
		if (is_array($callback))
		{
			if (isset($callback[0]) and
				isset($callback[1]) and
				is_string($callback[0]) and
				is_string($callback[1]))
			{
				$callback = $callback[0] . '::' . $callback[1];
			}
			else if (isset($callback[0]) and
					 isset($callback[1]) and
					 is_object($callback[0]) and
					 is_string($callback[1]))
			{
				; // Do nothing
			}
			else
			{
				if ($Driver)
				{
					$Driver->log('Invalid callback format: ' . print_r($callback, true), $ticket, QUICKBOOKS_LOG_NORMAL);
				}

				return false;
			}
		}

		// This section actually determines the callback type
		if (!$callback)
		{
			return QUICKBOOKS_CALLBACKS_TYPE_NONE;
		}
		else if (is_array($callback))
		{
			return QUICKBOOKS_CALLBACKS_TYPE_OBJECT_METHOD;
		}
		else if (is_string($callback) and false === strpos($callback, '::'))
		{
			return QUICKBOOKS_CALLBACKS_TYPE_FUNCTION;
		}
		else if (is_string($callback) and false !== strpos($callback, '::'))
		{
			return QUICKBOOKS_CALLBACKS_TYPE_STATIC_METHOD;
		}
		else if (is_object($callback) and $callback instanceof QuickBooks_Hook)
		{
			return QUICKBOOKS_CALLBACKS_TYPE_HOOK_INSTANCE;
		}

		if ($Driver)
		{
			// Log this...
			$Driver->log('Could not determine callback type: ' . gettype($callback), $ticket, QUICKBOOKS_LOG_NORMAL);
		}

		return false;
	}
Tell what type of callback this is (a function, an object instance method, a static method, etc.)