Ejemplo n.º 1
0
 /**
  * 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;
 }
Ejemplo n.º 2
0
 /**
  * Tests the Joomla\Database\DatabaseDriver::getPrefix method.
  *
  * @return  void
  *
  * @since   1.0
  */
 public function testGetPrefix()
 {
     $this->assertThat($this->instance->getPrefix(), $this->equalTo('&'));
 }
Ejemplo n.º 3
0
 /**
  * Get the database prefix.
  *
  * @return  string
  *
  * @since   1.0
  */
 public function getPrefix()
 {
     return $this->database->getPrefix();
 }