RedBeanPHP\Facade::getPDO PHP Method

getPDO() public static method

This is a convenience method, it will do the same as: R::getDatabaseAdapter()->getDatabase()->getPDO(); If the PDO object could not be found, for whatever reason, this method will return NULL instead.
public static getPDO ( ) : null | PDO
return null | PDO
    public static function getPDO()
    {
        $databaseAdapter = self::getDatabaseAdapter();
        if (is_null($databaseAdapter)) {
            return NULL;
        }
        $database = $databaseAdapter->getDatabase();
        if (is_null($database)) {
            return NULL;
        }
        if (!method_exists($database, 'getPDO')) {
            return NULL;
        }
        return $database->getPDO();
    }