 <p>The full method is pasted below. When calling JTable::getInstance you must pass $type as an argument. The getInstance method then uses $type to define $tableClass as you can see below. </p> <pre><code>// Sanitize and prepare the table class name. $type = preg_replace('/[^A-Z0-9_\.-]/i', '', $type); $tableClass = $prefix . ucfirst($type); </code></pre> <p>The method then proceeds to load (import) the class if it's not already and then finally calls return new $tableClass($db);</p> <p>So $tableClass is just a dynamic variable based on the $type argument. </p> <p>In your example above: </p> <pre><code>$row = JTable::getInstance('K2Item', 'Table'); </code></pre> <p>The $type and $prefix arguments are translated into the following:</p> <p>return new TableK2Item($db);</p> <p>So if you search for TableK2Item you should indeed find that class which has a hit() method.</p> <p>So $tableClass is actually defined in the getInstance method. </p> <p>Does this make sense?</p> <pre><code>/** * Static method to get an instance of a JTable class if it can be found in * the table include paths. To add include paths for searching for JTable * classes see JTable::addIncludePath(). * * @param string $type The type (name) of the JTable class to get an instance of. * @param string $prefix An optional prefix for the table class name. * @param array $config An optional array of configuration values for the JTable object. * * @return mixed A JTable object if found or boolean false if one could not be found. * * @link https://docs.joomla.org/JTable/getInstance * @since 11.1 */ public static function getInstance($type, $prefix = 'JTable', $config = array()) { // Sanitize and prepare the table class name. $type = preg_replace('/[^A-Z0-9_\.-]/i', '', $type); $tableClass = $prefix . ucfirst($type); // Only try to load the class if it doesn't already exist. if (!class_exists($tableClass)) { // Search for the class file in the JTable include paths. jimport('joomla.filesystem.path'); $paths = self::addIncludePath(); $pathIndex = 0; while (!class_exists($tableClass) &amp;&amp; $pathIndex &lt; count($paths)) { if ($tryThis = JPath::find($paths[$pathIndex++], strtolower($type) . '.php')) { // Import the class file. include_once $tryThis; } } if (!class_exists($tableClass)) { // If we were unable to find the class file in the JTable include paths, raise a warning and return false. JLog::add(JText::sprintf('JLIB_DATABASE_ERROR_NOT_SUPPORTED_FILE_NOT_FOUND', $type), JLog::WARNING, 'jerror'); return false; } } // If a database object was passed in the configuration array use it, otherwise get the global one from JFactory. $db = isset($config['dbo']) ? $config['dbo'] : JFactory::getDbo(); // Instantiate a new table class and return it. return new $tableClass($db); } </code></pre>