/** * Get the real name of the table, converting the prefix wildcard string if present. * * @param string $table The name of the table. * * @return string The real name of the table. * * @since 1.0 */ protected function getRealTableName($table) { $prefix = $this->db->getPrefix(); // Replace the magic prefix if found. $table = preg_replace('|^#__|', $prefix, $table); return $table; }
/** * Tests the Joomla\Database\DatabaseDriver::getPrefix method. * * @return void * * @since 1.0 */ public function testGetPrefix() { $this->assertThat($this->instance->getPrefix(), $this->equalTo('&')); }
/** * Get the database prefix. * * @return string * * @since 1.0 */ public function getPrefix() { return $this->database->getPrefix(); }