src/Joomlatools/Console/Command/Site/CheckIn.php
protected function _getTables()
    {
        $prefix = \JFactory::getApplication()->get('dbprefix');
        $dbo    = \JFactory::getDbo();
        $tables = array();

        foreach (\JFactory::getDbo()->getTableList() as $table)
        {
            // Only check in tables with a prefix
            if (stripos($table, $prefix) === 0)
            {
                $columns = $dbo->getTableColumns($table);

                // Make sure that the table has the check in columns
                if (!isset($columns[$this->_user_column]) || !isset($columns[$this->_date_column])) {
                    continue;
                }

                // Check the column's types.
                if (stripos($columns[$this->_user_column], 'int') !== 0 || stripos($columns[$this->_date_column], 'date') !== 0) {
                    continue;
                }

                $query = $dbo->getQuery(true)
                             ->select('COUNT(*)')
                             ->from($dbo->quoteName($table))
                             ->where(sprintf('%s > 0', $this->_user_column));

                $dbo->setQuery($query);

                // Only include tables that need to be checked in
                if (!$dbo->execute() || !$dbo->loadResult()) {
                    continue;
                }

                $tables[] = str_replace($prefix, '', $table);
            }
        }

        return $tables;
    }
protected function _getTables()
    {
        $prefix = \JFactory::getApplication()->get('dbprefix');
        $dbo    = \JFactory::getDbo();
        $tables = array();

        foreach (\JFactory::getDbo()->getTableList() as $table)
        {
            // Only check in tables with a prefix
            if (stripos($table, $prefix) === 0)
            {
                $columns = $dbo->getTableColumns($table);

                // Make sure that the table has the check in columns
                if (!isset($columns[$this->_user_column]) || !isset($columns[$this->_date_column])) {
                    continue;
                }

                // Check the column's types.
                if (stripos($columns[$this->_user_column], 'int') !== 0 || stripos($columns[$this->_date_column], 'date') !== 0) {
                    continue;
                }

                $query = $dbo->getQuery(true)
                             ->select('COUNT(*)')
                             ->from($dbo->quoteName($table))
                             ->where(sprintf('%s > 0', $this->_user_column));

                $dbo->setQuery($query);

                // Only include tables that need to be checked in
                if (!$dbo->execute() || !$dbo->loadResult()) {
                    continue;
                }

                $tables[] = str_replace($prefix, '', $table);
            }
        }

        return $tables;
    }
protected function _getTables ( ) { $ prefix = \ JFactory :: getApplication ( ) -> get ( 'dbprefix' ) ; $ dbo = \ JFactory :: getDbo ( ) ; $ tables = array ( ) ; foreach ( \ JFactory :: getDbo ( ) -> getTableList ( ) as $ table ) { // Only check in tables with a prefix if ( stripos ( $ table , $ prefix ) === 0 ) { $ columns = $ dbo -> getTableColumns ( $ table ) ; // Make sure that the table has the check in columns if ( ! isset ( $ columns [ $ this -> _user_column ] ) || ! isset ( $ columns [ $ this -> _date_column ] ) ) { continue ; } // Check the column's types. if ( stripos ( $ columns [ $ this -> _user_column ] , 'int' ) !== 0 || stripos ( $ columns [ $ this -> _date_column ] , 'date' ) !== 0 ) { continue ; } $ query = $ dbo -> getQuery ( true ) -> select ( 'COUNT(*)' ) -> from ( $ dbo -> quoteName ( $ table ) ) -> where ( sprintf ( '%s > 0' , $ this -> _user_column ) ) ; $ dbo -> setQuery ( $ query ) ; // Only include tables that need to be checked in if ( ! $ dbo -> execute ( ) || ! $ dbo -> loadResult ( ) ) { continue ; } $ tables [ ] = str_replace ( $ prefix , '' , $ table ) ; } } return $ tables ; }
Check in tables getter.

Only tables that need to be checked in will be returned.

@return array An array containing the name of the tables to check in.
Check in tables getter .