code/libraries/joomlatools/library/database/row/abstract.php
public function setTable($table)
    {
        if (!($table instanceof KDatabaseTableInterface))
        {
            if (is_string($table) && strpos($table, '.') === false)
            {
                $identifier = $this->getIdentifier()->toArray();
                $identifier['path'] = array('database', 'table');
                $identifier['name'] = KStringInflector::pluralize(KStringInflector::underscore($table));

                $identifier = $this->getIdentifier($identifier);
            }
            else $identifier = $this->getIdentifier($table);

            if ($identifier->path[1] != 'table') {
                throw new UnexpectedValueException('Identifier: ' . $identifier . ' is not a table identifier');
            }

            $table = $identifier;
        }

        $this->_table = $table;

        return $this;
    }
public function setTable($table)
    {
        if (!($table instanceof KDatabaseTableInterface))
        {
            if (is_string($table) && strpos($table, '.') === false)
            {
                $identifier = $this->getIdentifier()->toArray();
                $identifier['path'] = array('database', 'table');
                $identifier['name'] = KStringInflector::pluralize(KStringInflector::underscore($table));

                $identifier = $this->getIdentifier($identifier);
            }
            else $identifier = $this->getIdentifier($table);

            if ($identifier->path[1] != 'table') {
                throw new UnexpectedValueException('Identifier: ' . $identifier . ' is not a table identifier');
            }

            $table = $identifier;
        }

        $this->_table = $table;

        return $this;
    }
public function setTable ( $ table ) { if ( ! ( $ table instanceof KDatabaseTableInterface ) ) { if ( is_string ( $ table ) && strpos ( $ table , '.' ) === false ) { $ identifier = $ this -> getIdentifier ( ) -> toArray ( ) ; $ identifier [ 'path' ] = array ( 'database' , 'table' ) ; $ identifier [ 'name' ] = KStringInflector :: pluralize ( KStringInflector :: underscore ( $ table ) ) ; $ identifier = $ this -> getIdentifier ( $ identifier ) ; } else $ identifier = $ this -> getIdentifier ( $ table ) ; if ( $ identifier -> path [ 1 ] != 'table' ) { throw new UnexpectedValueException ( 'Identifier: ' . $ identifier . ' is not a table identifier' ) ; } $ table = $ identifier ; } $ this -> _table = $ table ; return $ this ; }
Method to set a table object attached to the rowset

@param    mixed    $table An object that implements ObjectInterface, ObjectIdentifier object
or valid identifier string
@throws  \UnexpectedValueException    If the identifier is not a table identifier
@return  KDatabaseRowInterface
Method to set a table object attached to the rowset