public function setTable($table)
    {
        if (is_string($table)) {
            $table = $this->getTableLocator()->get($table);
        }

        if (!($table instanceof Table)) {
            throw new \InvalidArgumentException(
                'The `$table` argument must be either a table alias, or an instance of `\Cake\ORM\Table`.'
            );
        }

        $this->_table = $table;

        return $this;
    }
public function setTable($table)
    {
        if (is_string($table)) {
            $table = $this->getTableLocator()->get($table);
        }

        if (!($table instanceof Table)) {
            throw new \InvalidArgumentException(
                'The `$table` argument must be either a table alias, or an instance of `\Cake\ORM\Table`.'
            );
        }

        $this->_table = $table;

        return $this;
    }
public function setTable ( $ table ) { if ( is_string ( $ table ) ) { $ table = $ this -> getTableLocator ( ) -> get ( $ table ) ; } if ( ! ( $ table instanceof Table ) ) { throw new \ InvalidArgumentException ( 'The `$table` argument must be either a table alias, or an instance of `\Cake\ORM\Table`.' ) ; } $ this -> _table = $ table ; return $ this ; }
Sets the table to use for persisting logs.

@param string|\Cake\ORM\Table $table Either a string denoting a table alias, or a table object.
@return $this
Sets the table to use for persisting logs .